Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

lookup field how to list key and value from Dynamics web API

(0) ShareShare
ReportReport
Posted on by 5

Hi.

I am working on a new integration with CRM and I need to get lookup fields (key and value) from CRM using Dynamic 365 API: dynamics.com/api/data/v9.0/[resource] I need to know the description of a specific lookup. 

  • Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: lookup field how to list key and value from Dynamics web API

    Is this issue resolved?

    If yes, please mark the appropriate answer as verified (Click 'Yes' under 'Did this answer your question?').

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: lookup field how to list key and value from Dynamics web API

    Hi,

    Thank you for your query.

    Lookups are references to an entity (N:1 relationship).

    There is no specific end-point that provides a list of lookup as key-value pairs. You need to point to entity dataset name to get the list.

    For example, we have 3 lookups on an entity:

    • Account
    • Primary Contact
    • Category (custom entity)

    To get these you have the following approaches:

    • Get the list of Accounts/Contacts with only the ID/Name attribute and convert this to a list of a key-value pair in your code. To get this data, just use endpoint with lookup dataset name, for example:
      • dynamics.com/api/data/v9.0/accounts$select=name
      • dynamics.com/api/data/v9.0/contacts$select=name
      • dynamics.com/api/data/v9.0/new_categories$select=name
    • You can also use expand to get the data from the lookup entity (along with the current record):

      Getting Lookup Fields from Dynamics 365 Web API URL - Carl de Souza

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.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans