Hi how could i retrieve in FetchXml the Target entity of a lookup field let's say OwnerId
thanks
Hi how could i retrieve in FetchXml the Target entity of a lookup field let's say OwnerId
thanks
Hi,
Yes it is possible to get target entity from c# code...
Lookup is of Entity reference and EntityReference has LogicalName property which will give you target entity name of lookup field.
Example
EntityReference owner=(EntityReference)entity["ownerid"];
string entityName=owner.LogicalName;
Please mark my answer verified if i were helpful
Hello,
Where do you use it? Is it report or code?
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156