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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Verified answer
    Inogic Profile Picture
    748 on at

    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!

  • Verified answer
    Alagunellaikumar Profile Picture
    6,212 on at

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

  • clw Profile Picture
    205 on at

    Thank you!

  • clw Profile Picture
    205 on at

    I should've said, thank you both!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans