Announcements
Hi Team ,
I want to know any Rest API to identify if the lookup field is multiple reference field ?
I used this below API to get field attributes : /api/data/v9.1/EntityDefinitions(LogicalName%20=%20'phonecall')/Attributes , i didn't identify the field is multiple reference from the API response.
Can anyone help to find out multiple reference fields for the form like Phonecall ( To field ) ?
Thanks . In this document - Partlist lookup allow multiple reference to multiple entities. docs.microsoft.com/.../types-of-fields
But Call "from" allow single entity only and "to" allow multiple entities. how do we differentiate it from api response ?
Hi partner,
What does "multiple reference fields" mean? If you mean the field like "Call To" which could store multiple records in lookup filed, it is actually Party List field as I mentioned before.
And if you want to identify them, the default party list fields are list in the link I provided in my last answer.
And if you want to identify them by code, you could also use the web api to retrieve the attribute type as I mentioned in my last answer also.
If my understanding is not correct, please feel free to let me know.
Regards,
Leo
Thanks for your reply. Is there any multiple reference fields in MSDynamics? If yes , how do we identify?
Hi partner,
Actually, the From and To field are not lookup fields, they are "Party List" fields.
And we could use REST API to retrieve attribute type in Metedata.
For example, I want to get all Party List fields in Phone call entity, I will use this request.
GET [Organization URI]/api/data/v9.0/EntityDefinitions(LogicalName='phonecall')?$select=LogicalName&$expand=Attributes($select=LogicalName;$filter=AttributeType eq Microsoft.Dynamics.CRM.AttributeTypeCode'PartyList')
And here is the result.
And if you want to check a special field if it is party List field, you could use this request.
GET [Organization URI]/api/data/v9.0/EntityDefinitions(LogicalName='account')/Attributes(5967e7cc-afbb-4c10-bf7e-e7ef430c52be)/Microsoft.Dynamics.CRM.PartyListAttributeMetadata?$select=LogicalName&$expand=OptionSet
Best Regards,
Leo
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... 290,807 Super User 2024 Season 2
Martin Dráb 229,135 Most Valuable Professional
nmaenpaa 101,156