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 / How to mark a dynamics...
Power Automate
Unanswered

How to mark a dynamics 365 task as completed

(0) ShareShare
ReportReport
Posted on by 47

Hi Community,

 

Like everyone else, I was 'copy & paste' all the workflows in D365 to Power Automate, however, here is a really simple question that I cannot figure out.

 

In my D365 workflow, I can create a Task record, and change record status to 'Completed' (see the screenshot below) 

Task issue 1.PNG

 

However, in the power automate, I don't really know how to do that,  I tried to 'Update the record' -> change the status to completed, then I received this error message: 

Task issue 2.PNG

 

The flow in the power automate is really simple: Create a record (CDS) -> Update a record (CDS), i deleted the 'update record' stage as it doesn't work.

Task issue 3.PNG

 

Also, just another question, when do we use create a CDS record, and when do we use create a d365 record? 

 

Many many thanks in advance,

Dominic

Categories:
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @domdom 

     

    Here is an example of create a task record and update the status. If this does not help you much share a screen capture of your flow so i can help you better.

    CDSTask.png

     

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

  • domdom Profile Picture
    47 on at

    Thanks for your reply, this is exactly what i did and it just doesn't work 😞

     

    The error message is: 5 is not a valid status code for state code TaskState. 5 is the value of 'completed' in our CRM

  • shennu Profile Picture
    82 on at

    @domdom 

     

    Don't know if you have found the solution for this. And I have just came across the same error with both CDS and the current environment connector. In case if anyone else gets this error, here is what worked for me

     

    Update the field "Activity Status" instead of the "Status Reason"

  • GB-Andworx Profile Picture
    33 on at

    I'm coming across this same error too. It looks like you can't set Activity Status (so all created records will be in "Open") and can't set a Status Reason that doesn't map to the Open Activity Status.

     

    For context, see this MS article about statecode and statuscode - Activity (ActivityPointer) table - Power Apps | Microsoft Learn

  • GB-Andworx Profile Picture
    33 on at

    Actually, I just found a solution at Close Case with Power Automate » Benedikt's Power Platform Blog (benediktbergmann.eu). It's annoyingly complicated, but at least it works. Refer to his blog for the full explanation, but at a high level:

    1. Create a custom bound action on your table in your solution (to change status to 'complete' or 'canceled')
    2. Use a condition in the flow to call the appropriate bound action

    @domdom if I have answered your question, please mark your post as Solved. If you like my response, please give it a Thumbs Up.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard