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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Change status reason based on opportunity phase

(0) ShareShare
ReportReport
Posted on by 595

Hi All,

Is it possible to change the status reason based on phase of the opportunity dynamically?

Thanks,

Abhilash.

*This post is locked for comments

I have the same question (0)
  • Abhilash M abi Profile Picture
    595 on at
    RE: Change status reason based on opportunity phase

    I have used the javascript

    var field = <Xrm.Page.OptionSetControl>Xrm.Page.getControl("statuscode");

           switch (stepName.getValue().charAt(0)) {

               case "1":

                   if (field != null) {

                       field.removeOption(596030006);

                       field.removeOption(596030007);

                       field.removeOption(596030008);

                       field.removeOption(596030009);

                       field.removeOption(596030010);

                   }

                   break;

               case "2":

                   if (field != null) {

                       field.removeOption(1);

                       field.removeOption(2);

                       field.removeOption(596030001);

                       field.removeOption(596030005);

                   }

                   break;

    But it is raising the error The object does not support the "removeOption" property or method

  • Suggested answer
    tw0sh3ds Profile Picture
    5,600 on at
    RE: Change status reason based on opportunity phase

    Hi,

    If I understand you question you want to change opportunity status based on Business Process Flow Stage? It is possible using a plugin or a workflow (workflow can be triggered on Process Stage Change). If you meant another field on Opportunity - again it can be done using plugin, workflow or javascript.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans