November 2017
Intermediate to advanced
402 pages
7h 49m
English
Microsoft Dynamics 365 is a metadata-driven application. Sometimes, you need to query the metadata while working with requirements such as those mentioned in this scenario. For this purpose, you can easily query the metadata using the Web API. We will use the EntityDefinitions entity to retrieve the metadata of the Contact entity. The URL will be as follows:
clientURL + "api/data/v8.2/EntityDefinitions(LogicalName='contact')/Attributes"
We will create an HTML web resource and the following is the code to retrieve the metadata using the Web API. You will need to create a HTML control for selection in the web resource, as you cannot append items into the option set. So, we'll use the $(document).ready