This web api query (when replacing correct domain and guid) returns json for a specific quote record with a createdby object that contains all the information pertaining to the user that created the record.
https://somefoo.bardomain.dynamics.com/api/data/v9.1/biz_foo_types(292afb30-3488-4393-b91b-3f7efa498a29)?$expand=createdby
https://somefoo.bardomain.dynamics.com/api/data/v9.1/biz_bar_types(fe23ba2e-d3e5-4e3e-a171-fe735032a5b1)?$expand=createdby
The same structure query but for custom entities (I've tried a few) results in error like:
"code":"0x0","message":"Could not find a property named 'createdby' on type 'Microsoft.Dynamics.CRM.mt_foo_types'."
All of our custom entities have the createdby navigation property (automatically created by D365 if I'm not mistaken) when I look at the $metadata and when returning the records for the custom entities I can see the _createdby_value property populated with a Guid.
Is this a known issue? Is there something that I need to do to make that relationship available via OData?
Many thanks,
James
Hi,
Can you try adding select to read specific fields?
org50b8451e.crm8.dynamics.com/.../msft_employees(d90e28e0-bb2c-ec11-b6e6-6045bd72faf4)
I tried this on my trial instance for custom entity and it worked.
Please mark my answer verified if this is helpful!
Regards,
Bipin Kumar
Follow my Blog: xrmdynamicscrm.wordpress.com/
Hello,
its case-aware .. try "CreatedBy"
I should say I appreciate that I can query the user and expand the collection relationship that way it just seems odd that the properties on the quote worked one way but custom entities it seems to be lacking the same capability.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156