GetEntityMetadata returns 0 attributes

295 Views Asked by At

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?

1

There are 1 best solutions below

1
Arun Vinoth-Precog Tech - MVP On BEST ANSWER

You have to pass a string array of attributes list as second parameter to get them.

Xrm.Utility.getEntityMetadata("account", ["accountname", "createdon"]).then(success);

enter image description here

Read more