cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
wjblomjous
Frequent Visitor

Close an opportunity in Dynamics / CRM

 

Hi,

 

I'm trying to build a flow that closes an opportunity in Dynamics CRM as lost. In that way I can clean up CRM of all outdated opportunities that are lost or not persued.

I started with one specific opportunity to check if the principal is working. How ever I cannot get it to work. I first get the specific opportunity I use to test the principal. Than I try to close the opportunity, (first I did this in CRM and got all the relevant fiels that suppost to be filled in). However he keeps stating that the "100000002 is not a valid status code for state code OpportunityState.Open on opportunity with Id 733cb77e-4c78-e711-8111-e0071b6ee421."But if I close the opportunity in CRM, this is the value that is presented.

 

Can anyone help me to find a solution.

 

Thank you very much!

 

Willem-Jan 

 

 

2017-08-10 15_46_02-Uw stroom bewerken _ Microsoft Flow - Internet Explorer.png2017-08-10 15_50_05-Uw stroom bewerken _ Microsoft Flow - Internet Explorer.png2017-08-10 15_49_09-Uw stroom bewerken _ Microsoft Flow - Internet Explorer.png2017-08-10 15_50_56-Uw stroom bewerken _ Microsoft Flow - Internet Explorer.png2017-08-10 15_51_46-Uw stroom bewerken _ Microsoft Flow - Internet Explorer.png

 

 

5 REPLIES 5
Community Support
Community Support

Re: Close an opportunity in Dynamics / CRM

Hi @wjblomjous,

 

I'm investigating on this issue and will get back once I got any update.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wjblomjous
Frequent Visitor

Re: Close an opportunity in Dynamics / CRM

Dear Mona,

 

I was wondering if you have any update on this topic? This would be very helpfull for us.

 

Thanks in adavance!

 

Best regards,

 

Willem-Jan

Rkaur Helper IV
Helper IV

Re: Close an opportunity in Dynamics / CRM

Hi Team,

 

Is there any update on this issue.

i have a similar scenario to close teh opportunity.

 foelds m updating is 

1. actual close date

2. statsu reason 

3. status label

 

The error I get is -

""This message can not be used to set the state of opportunity to won. In order to set state of opportunity to won, use the won message instead."

 

Please assist

tohms Advocate I
Advocate I

Re: Close an opportunity in Dynamics / CRM

The error I get is -

""This message can not be used to set the state of opportunity to won. In order to set state of opportunity to won, use the won message instead."


Same issue here.

 

One reason I've found out is that you are only allowed to set the status reason. But when doing that, I'm getting another error stating the status code (3 for "won" in my case) is not valid.

EmpellorCRM
New Member

Re: Close an opportunity in Dynamics / CRM

You cannot update the statecode and statusreason fields of an opportunity.  You must create an Opportunity Close Activity record.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,764)