cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ManuelR
Level: Powered On

Dynamics 365 Connector - Update record status

As far as I know I need to send the new statecode and statuscode fields to the dyn365 api in order to change the record status. (e.g. status=completed) Unfortunately the statecode field is missing in the Dyn365 PowerApp Update action. Changing statuscode only causes an error as I expected. So please provide the possiblity to change a record status within dyn365.

4 REPLIES 4
Community Support Team
Community Support Team

Re: Dynamics 365 Connector - Update record status

Hi @ManuelR,

 

Would you please share more details about which entity that you would like to update through Microsoft Flow?

The status might be a lookup field, and the value of it should be a GUID, just update it with the status string may not work as expected.

Further, would it be convenient for you to share the error message when changing the statuscode under Flow (Better a screenshot) ?

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ManuelR
Level: Powered On

Re: Dynamics 365 Connector - Update record status

Hi Michael,

 

first of all, thanks for your reply. 

 

Screenshot: https://i.imgur.com/EVVgBSH.png

Error:

{"status":400,"source":"https://europe-001.token.azure-apim.net:443/tokens/europe-001/dynamicscrmonline/shared-dynamicscrmon... error has occurred."}

 

As I said before, I'm pretty sure the error occurs because dyn365 expects statuscode AND STATECODE to update the status of the record.

 

No, in dyn365 the status isn't a lookup field, it's a optionset field. It doesn't matter which entity I try to update regarding the statecode field - the field is missing all over. (whether custom or out of the box entity)

 

I think other users have similar problems like me:

https://powerusers.microsoft.com/t5/PowerApps-Forum/Statecode-value-CRM-Online-Close-as-lost-or-won/...

https://social.msdn.microsoft.com/Forums/en-US/94368091-0147-478d-b258-e5a881452724/logic-apps-dynam...

joshbrownwsna
Level: Powered On

Re: Dynamics 365 Connector - Update record status

Hi Everyone,

 

Has anyone found a workaround for this issue? 

 

It would be great to know as the connector does not yet appear to support record state and status reason throws the 400 bad request error noted above.

 

Thanks!

 

Josh

Pavlos
Level: Powered On

Re: Dynamics 365 Connector - Update record status

hi ManuelR, 

 

Indeed this is an annoying issue, Patch function doesn't work at all

 

Solution

I had to create a Flow as a workarround. 

I step flow, the Flow asks the PowerApp to pass the recor identifier. Which in my case I am selecting the record in a Gallery so it was easy to pass the parameter back to flow. 

 

It takes only a second to update the record in Dyn365. 

Untitled picture.png

 

Click on the "Show advanced Options" and change the status to what you need. 

 

Hope this helps.

Pavlos

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 336 members 5,021 guests
Please welcome our newest community members: