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 ) ?
Hi partner,
Actually, the From and To field are not lookup fields, they are "Party List" fields.
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/activityparty-entity
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')
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-metadata-web-api#querying-entitymetadata-attributes
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/attributetypecode?view=dynamics-ce-odata-9
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
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-metadata-web-api#retrieving-attributes
Best Regards,
Leo
Thanks for your reply. Is there any multiple reference fields in MSDynamics? If yes , how do we identify?
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,
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 ?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
MVP-Daniyal Khaleel 60
Tom_Gioielli 16 Super User 2025 Season 2
CU29080825-0 16