Skip to main content

Notifications

Community site session details

Community site session details

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

Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId

(2) ShareShare
ReportReport
Posted on by 8
I posted about this issue in the Power Automate community, but maybe there is not enough overlap with Business Central users over there.
 
When I start a flow from a Posted Sales Invoice using the For a selected record V3 trigger, the flow will always fail because the SystemId that the trigger returns cannot be found in the salesInvoices table 112.

The reason is that the trigger returns the Draft Sales Invoice SystemId field and not the SystemId from table 112. The Draft Sales Invoice SystemId is not part of the API. So there is no way for me to know which Posted Sales Invoice the flow was triggered from.

This issue is identical in the public API v2.0.

Has anyone else run into this issue?

 

/gabeng_0-1698689979149.png/

 















 






 
  • Suggested answer
    YUN ZHU Profile Picture
    84,562 Super User 2025 Season 1 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    Hi, hope the following helps as well.
    Dynamics 365 Business Central: “For a selected record (V3)” trigger in Power Automate
    Dynamics 365 Business Central: How to create Sales Order from Purchase Order with Power Automate – Copy Document from PO to SO
    Dynamics 365 Business Central: How to Copy Existing Customer to New Customer with Power Automate (Copy Customer)
    Create a flow in Power Automate to update multiple customer pictures in Business Central from OneDrive
    How to import data to Business Central by uploading a file with Power Automate (No customization)
     
     
    Thanks.
    ZHU
  • Suggested answer
    Sagar Dangar, MCP Profile Picture
    562 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    Hi,
     
     
     
    You can use page id instead of table id to trigger specific to Posted sales invoice page only.
     
     
    you can also take below business event to trigger at same time when user post invoice in Business Central
     
  • CB-05021921-0 Profile Picture
    9 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    @gabeng - after trial and error over some hours. For some reason it started working for me. I believe I had to open the web service by clicking Edit in Excel from the Posted Sales Invoice and Posted Sales Invoice lines pages. No idea if that was actually the solution but if somebody sees this than this was my setup. Get Record > SystemID & then the Get an image, file, or document used dynamic content from the Id from Get Record (V3).
  • gabeng Profile Picture
    8 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    @CB-05021921-0, for some reason, I did not notice YUN ZHU's answer two years ago. Anyhow, I just wanted to explore automation of BC tasks using Power Automate. I did not want to start programming apps. For some reason, MS thinks that delivering a half-baked BC connector would provide any value.
  • CB-05021921-0 Profile Picture
    9 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    I am facing the same problem. Did you ever get this figured out? YUN ZHU explanation for using a temporary table is very helpful but his blogs are not directly related. It is weird but using the "when record is created" and using the "body/row ID" dynamic content from that original trigger it works correctly as an alternative to SystemID. However, that is with a trigger of Posting not for already posted entries.
  • Suggested answer
    YUN ZHU Profile Picture
    84,562 Super User 2025 Season 1 on at
    Power Automate: Trigger for Posted Sales Invoice does not return correct SystemId
    Hi, Standard APIs such as Sales Order and Sales Invoice do not directly use the Sales Header or Sales Invoice Header table, but use an intermediate table.
    For example,
     
    You can delete TABLE112 in the above steps and it should be ready to use.
    Here are two simple examples. Although they are not exactly the same as yours, I hope they can give you some tips.
     
    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans