cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
v-monli-msft
Community Support
Community Support

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.

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

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

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
Regular Visitor

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,009)