Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Properties present in metadata but CRUD operations are failing while retrieving record using such fields

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  1. To retrieve all supported object - GET /EntityDefinitions
  2. 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:

  1. slaid  (Target object - sla)
  2. slainvokedid  (Target object - sla)
  3. parentcustomerid (Target object - account, contact)
  4. preferredsystemuserid (Target object - systemuser) 
  5. 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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans