I was given a Fetch XML and used it lik so: /api/data/v9.0/opportunities?$count=true&fetchXml=%3.........
the results gave me just the IDs of the related names I expected, not the names.
It C# and Microsoft.PowerPlatform.Dataverse.Client.Dynamics I get the names just by adding them to q.ColumnSet = new ColumnSet({here}
and the result is of type "EntityReference" but I need this query for JavaScript.
When I add the referenced to the $select=, i get error that they do not exist . also when I use them in &expand=
Is there a syntax I am missing to do this in REST?
Thank you
with my tool you can fetch the relationships, under Table there are the relationships (one-to-many, many-to-one, many-to-many) press select and find the relationship and the columns you want to fetch
This ownsome. thank you man!
I was able to get all the formatted values.
The only item I can't figure out is in a one to one relation.
In C# I get it with
q.LinkEntities.Add(new LinkEntity("opportunity", "ecg_org", "ecg_practice", "ecg_orgid", JoinOperator.Inner)); q.LinkEntities[0].Columns.AddColumns("ecg_division"); q.LinkEntities[0].EntityAlias = "Practice";
The XML has
I use React fetch so I need to npm Xrm.Utility.?
until now I just got a token and put it in the header.
Thanks again
the OData syntax of lookups is different (they don't use the logical name) use my tool Dataverse REST Builder to build the query and generate the JavaScript code to read the result.
Adis
136
Super User 2025 Season 1
Sohail Ahmed
81
Jonas "Jones" Melgaard
77
Super User 2025 Season 1