Hi,
I am working on MS Dynamics CRM integration and getting ref from WEB APIs v8.2/9.0.
To fulfill my integration scenarios I am using below REST APIs https://msdn.microsoft.com/en-us/library/mt607522.aspx#bkmk_QueryingEntityMetadata :
- To retrieve all supported object - GET /EntityDefinitions
- To retrieve Contact object metadata - GET /EntityDefinitions(LogicalName='contact')/Attributes
While working on Retrieve operation for Contact object GET /contacts , I come to know it supports below reference fields which targets to other objects in CRM System:
- slaid (Target object - sla)
- slainvokedid (Target object - sla)
- parentcustomerid (Target object - account, contact)
- preferredsystemuserid (Target object - systemuser)
- preferredequipmentid (Target object - equipment)
As per CRM API documentation, we can use odata $expand for the above properties. But somehow for the first 3 field mentioned above it is not working as expected. for fields 4 and 5 it is working as expected.
The first 3 fields are present in Contact metadata but if we use $expand=slaid API throws below error :
GET xxx.crm8.dynamics.com/.../contacts?$expand=slaid
Could not find a property named 'slaid' on type 'Microsoft.Dynamics.CRM.contact'
Now, I tried to debug all the above mentioned things and come to know that there is fields discrepancies in /EntityDefinitions. I could come to know and verified successfully that for fields 1-3,field name mentioned in /EntityDefinitions is wrong and actual names are mentioned below:
Wrong Field Name | Correct Field Name |
slaid | sla_contact_sla |
slainvokedid | slainvokedid_contact_sla |
parentcustomerid | parentcustomerid_account and parentcustomerid_contact |
I am facing above field level issue in almost all supported objects of MS Dynamics CRM.
Could you please guide me here, is there any issues in EntityDefinitions APIs or am I missing something here?
*This post is locked for comments