web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse API Patch Lo...
Power Apps
Unanswered

Dataverse API Patch Lookup Column with Postman

(0) ShareShare
ReportReport
Posted on by 36

We are working on building out our integrations with dataverse and are having difficulty determining the syntax for updating a lookup column on another table, with an alternate key. We are loading our user information into the contact table and have a lookup to our department table (cr9cd_tu_department), which also has an alternate key on it (cr9cd_departmentid). I have read through other posts and tried countless combinations, but I am still stuck. Should the bind be to the lookup table? I have tried this with both the alternate key and the GUID. 

 

 {
 "cr9cd_dept_it_lookup_cr9cd_tu_department@OData.bind":"/cr9cd_tu_departments(cr9cd_departmentid = '19410')"
 }

 {
 "cr9cd_dept_it_lookup_cr9cd_tu_department@OData.bind":"/cr9cd_tu_departments(93af7394-05d8-ee11-9079-6045bd04ad21)"
 }

 

 
When I perform a GET on a successful row, I also see that the field is formatted as _cr9cd_tu_deptid_lookup_value with the GUID being in there, instead of our alternate key. If I try below, I get the error: 
"CRM do not support direct update of Entity Reference properties, Use Navigation properties instead."

 

 {
 "_cr9cd_tu_deptid_lookup_value":"93af7394-05d8-ee11-9079-6045bd04ad21"
 }​

 

I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    Hi,

    you can use my tool Dataverse REST Builder to create the correct PATCH request, after you can export from my tool to Postman.

    My tool only has the GUID reference to update a lookup, however you can also create a "Retrieve Single" request to get the record and copy that syntax to the lookup and see if it works

  • DF-29082254-0 Profile Picture
    36 on at

    This was super helpful, I was able to get this to patch properly. For any users that still need help with this, I found the following syntax worked:

     
    {"[SCHEMA NAME OF SOURCE FIELD]@odata.bind": "/[PLURAL ENTITY NAME OF TARGET FIELD]([LOGICAL FIELD NAME] = 'VALUE')"}
  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    Hi @dfricker, is not the schema name of source field, is (as the error told you before) the navigation property. That is stored inside the metadata (and my tool uses it), it can be the same as the schema name but not always.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard