cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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.
Highlighted

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

Highlighted

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

Highlighted

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.

Highlighted
New Member

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,503)