Hello,
I'm trying to use Xrm.Utility.getEntityMetadata to get the type of an entity field in CRM, but I'm not getting it. In the documentation it says that when executing the command, a collection of attributes is returned and it has the type of the attribute.
Xrm.Utility.getEntityMetadata('account', 'name').then( function(entityMetadata){ console.log(entityMetadata); console.log(entityMetadata.Attibutes['name'].AttributeType); } )
When I run the code above, several properties are returned, but I don't know how to get the type of field I want. Could someone please give me an example of how to get this property?