cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KimB
Level: Powered On

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

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-entit...

 

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.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 280 members 4,528 guests
Please welcome our newest community members: