I need to get all the fields for a specific entity. I am currently using Xrm.Utility.getEntityMetadata("entity_name").then(success, failure);
but on success the data returned has no attributes. Got any idea why?
You have to pass a string array of attributes list as second parameter to get them.
Xrm.Utility.getEntityMetadata("account", ["accountname", "createdon"]).then(success);