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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / D365 FO Execute action...
Power Automate
Answered

D365 FO Execute action - Workflow Workitem complete - Error

(2) ShareShare
ReportReport
Posted on by 40

Hello All,

 

I am trying to complete D365 Workflow Workitem using Power Automate. I am using D365 Execute action and its failing continuously. Can anyone please help . 

 

Pratik6_0-1711726964192.png

 

Error - 

An error has occurred. Exception occurred while executing action complete on Entity WorkflowWorkItem: Unable to complete because action is not in a state that can be completed. Exception has been thrown by the target of an invocation.
clientRequestId: 1ad7232a-0b7f-41df-9dca-423a7ceef526

 

Steps to reproduce the issue - 

  1. Create flow with template - Complete Dynamics 365 for Finance and Operations workflow work items (PU29)
  2. Assign D365 workflow workitem as trigger 
  3. Submit D365 FO workflow used as trigger above
  4. It will trigger this flow and try to complete workitem in D365 (which is failing)

I am facing same issue for multiple clients and raised support case with MS support as well but no resolution yet.  

Categories:
I have the same question (1)
  • AbdulAleem810 Profile Picture
    2 on at

    Hi Pratik, did you got the solution for this problem? I am facing this too.

  • SteveMcGraw Profile Picture
    19 on at

    Same here, this issue started shortly after the 10.0.39 F&O update. We noticed that if the workflow is in stopped status, approvals are successful. The issue appears to be related to the validation function on WorkflowWorkItem. It is driving us crazy. If you find a resolution please let us know.

  • Verified answer
    SteveMcGraw Profile Picture
    19 on at

    Ok so our wonderful consultant figured this out for us. Here is what he wrote:

     

    There is a MS standard bug which I found in the class “VendInvoiceWorkflowValidation”.

    It is taking the invoice as duplication record and make the flag “isInvoiceNumberfreeForUse” =  false

    That is the reason it is throwing error that “Unable to complete because action is not in a state that can be completed.”

     

    Basically the complete action includes a validation, the validation sees its own invoice number, and since the invoice is under review, the validation fails.

     

    He also said that we don't have access to touch this code ourselves and will have to wait on a fix from Microsoft. I am putting in a ticket now.

     

  • PratikK Profile Picture
    40 on at

    @SteveMcGraw - That's great! I also have ticket open with Microsoft for serveral month. I will let them know these steps. Hope to get it fixed soon. 

  • SteveMcGraw Profile Picture
    19 on at

    Here is our microsoft ticket number. I included code screenshots of exactly where the validation fails in the referenced function: 2405010040002963

  • Justin Berry Profile Picture
    10 on at

    Adding our SR to the very same puppy pile, 2405030010004870... MS support has not had much to say as of yet...

  • SteveMcGraw Profile Picture
    19 on at

    Our consultant is going to meet with microsoft tech support and demonstrate the error in the code. Shout out to HSO, they do great work!

  • SteveMcGraw Profile Picture
    19 on at

    Bug submitted by MS support

  • Justin Berry Profile Picture
    10 on at

    I got them to submit a bug as well... There is a kill switch flight for the new code that they can enable to fix the issue, it's on the VendInvoiceCheckDupNumInRunningWorkflowFlight...

  • SteveMcGraw Profile Picture
    19 on at

    Thanks Justin, is that the fix or a workaround? I don't know what unintended consequences this would have. Thank you!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 344 Super User 2026 Season 1

Last 30 days Overall leaderboard