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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Update Sales Header in Power Automate failed: 1 of 2 keys provided for lookup, provide keys for...

(3) ShareShare
ReportReport
Posted on by 10
We need to update the BC Sales Header data (Document Date, Package Tracking No.) using Power Automate.
We have created an API Page to expose the required fields from the Sales Header table, part of the source code is shown below.

 
In Power Automate, firstly, we leveraged the filter query in the /Find records (V3)/ connector to find the target record.

 
After that, we used the /Update record (V3)/ connector to update the corresponding columns (defined in the API Page) of the target record, however, the update connector failed with the error: /1 of 2 keys provided for lookup, provide keys for only DocumentType,No./

 
We also tried the /Get record (V3)/ connector, which resulted in the same error.

 
In the connectors, we are using the /Row id/ to specify the corresponding record, which was retrieved from the /Find records (V3) connector, however, the error details reveal that we need to specify the primary key (DocumentType and No.) of the Sales Header record. But there is nowhere we can enter the primary key value in the connectors.
 
So my question is, is the /Update Record (V3)/ connector capable of updating data in the Sales Order table?
What is the reason and how to fix the /1 of 2 keys provided for lookup, provide keys for only DocumentType,No./ problem?
Please help & Thank you!
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,779 Super User 2026 Season 1 on at
    Hi,
     
    In Power Automate you must use the System ID to identify the rows not the primary keys insted BC.
     
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • seanyu Profile Picture
    10 on at
    Hi Mohamed,
     
    Thank you for the information.
    I was using the "Row id", which is exactly the System id acquired from the previous find record action.
    As described in my original post, passing the row id to the Get record or Update record connector did not work.
     
  • Suggested answer
    YUN ZHU Profile Picture
    97,970 Super User 2026 Season 1 on at
    Hi, please try the same as the standard API, using the "Sales Order Entity Buffer" table instead of the Sales Header. This should solve the problem. 
     
    PS: It is recommended to directly copy the code of this standard page, then delete the unnecessary parts and add the fields you need.
     
     
    Hope this helps.
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,161 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,046 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 932 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans