web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Close an opportunity i...
Power Automate
Unanswered

Close an opportunity in Dynamics / CRM

(0) ShareShare
ReportReport
Posted on by

 

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

 

 

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    on at

    Hi @Anonymous,

     

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

     

    Regards,

    Mona

  • Community Power Platform Member Profile Picture
    on at

    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 Profile Picture
    84 on at

    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 Profile Picture
    5 on at

    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.

  • Empellor CRM Profile Picture
    8 on at

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard