RE: How can I get the account primary contact in expand?
Hi Partner,
Are you using online version Dynamics?
What's the relationship between your Outcomechain entity and Account?
Is it also a N:1 relationship?(account is lookup field of outcomechain)
I created a custom entity Doctor and add Account as its lookup field.
So relationships of these 3 entities are:
Doctor -> Account (N:1)
Account -> Contact (N:1)
Primary contact data is available when using multiple expand:
https://aaa.crm5.dynamics.com/api/data/v9.2/new_doctors(3F4F2E69-1356-EB11-A812-00224816BC2D)?$select=new_name,new_email&$expand=new_Account($select=name,address1_city,telephone1,_primarycontactid_value;$expand=primarycontactid($select=fullname,emailaddress1))
Try removing select operator to return all attributes to check whether fullname and emailaddress1 are still null.
Or please let me know which Dynamics app you are using which might be helpful to me to reproduce the issue, because I copied your query URL, but it didn't return "__DisplayName__" and "IsReferencedQueryCall" attributes in my environment.
(I tested the API in Dynamics 365 for Marketing app.)