Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Web API: How to retrieve a record based on an alternate key with lookup field?

(0) ShareShare
ReportReport
Posted on by 32

Hi

 

Using Web API, we are used to retrieve a record quite often with an alternate key:

{{webapiurl}}/cr23b_tmps(cr23b_string1='abc')

 

However, in this case, the alternate key is based on a lookup (e.g. accountid). Adding a lookup field in an alternate key should be possible, according to this documentation: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/define-alternate-keys-entity

 

In Web API, I don't seem to find a right way to use the alternate key (based on lookup) in a GET request. These are some tests which did not work:

  • GET {{webapiurl}}/cr23b_tmps(cr23b_accountid=’1275227F-93A8-E911-A821-000D3ABA5555')
  • GET {{webapiurl}}/cr23b_tmps(cr23b_accountid='/accounts(1275227F-93A8-E911-A821-000D3ABA5555)')

 

Does anyone know how to do this?

 

Kind regards.

  • summitb Profile Picture
    on at
    Re: Web API: How to retrieve a record based on an alternate key with lookup field?

    Hey @KimB 

    https://www.inogic.com/blog/2016/10/retrieve-update-and-delete-record-using-alternate-key-in-dynamics-crm-web-api/

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics