Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Change Opportunity Form Based on Field Value

(0) ShareShare
ReportReport
Posted on by 205

Hello!

Is it possible to set a workflow to pick which form to use when a lead is qualified?

I've made a new Lead to Opportunity sales process where in the lead stage there is a field called "client type".  From there the process branches into three different process flows depending on the client type.  Can the opportunity form be updated via the client type field as well?

For example if I have a buyer and a seller client type, when the user qualifies the lead a different process ribbon is displayed depending on if it's a buyer or seller client.  I'm trying have the opportunity form below the process ribbon be specific to each client type.

Any idea if it's possible, and if so, how do I go about setting that up?

Thank you! 

*This post is locked for comments

  • clw Profile Picture
    clw 205 on at
    RE: Change Opportunity Form Based on Field Value

    I should've said, thank you both!

  • clw Profile Picture
    clw 205 on at
    RE: Change Opportunity Form Based on Field Value

    Thank you!

  • Verified answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Change Opportunity Form Based on Field Value

    It is not possible through work flow but doing javascript we can make it. please see inogic comments

  • Verified answer
    Inogic Profile Picture
    Inogic 418 on at
    RE: Change Opportunity Form Based on Field Value

    You can set forms based on the field value using Script.

    You need to follow below steps:

    We assume that you have two forms Form-ABC and Form-DEF  and on change of Option Set X  you want to set these form respectively. 

    1. Get Current Form Id  using below code

    //Get the id of currentform Id

          var currentFormId = Xrm.Page.ui.formSelector.getCurrentItem().getId()

    2. Get all the Forms.

    //Get all main form of APR entity.

            var items = Xrm.Page.ui.formSelector.items.get();

    3. Verify the Option set value and based on that  value you can loop through the all the form and set the form which you want.

    if (OptionSetValue == "Set ABC Form") {

                  for(var i=0;i<items.length;i++)

            {

                       if (items[i].getLabel().toLowerCase().trim() == "form-abc ") {

                       var FormId = items[i].getId();

                       if (FormId != currentFormId) {

    Xrm.Page.ui.formSelector.items.get(FormId).navigate();

    break;

                       }

                  }

                        

                  }

       }

     

    Or you may check below link.

    https://community.dynamics.com/crm/f/117/t/149542

    Thanks!

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans