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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Code behind the Qualify Button

(0) ShareShare
ReportReport
Posted on by 235

This is a question about how the Sales Hub is represented in the Unified Interface as a Model Driven App.

If I open up the Sales Hub as a Model Driven App then I can see a number of forms, dasboards etc.  However, I don't think I have yet found the control and code behind the Qualify button.  The Forms just seem to cover the page element below the command bar and not the bar itself.

Presumably, when I press the qualify button some routine is executed to create that as a contact, and create a new opportunity.  What kind of routine is that?  Is it a BPF?  Could someone point me to where I would expose both the command bar and form controls, and the underlying routines, in the Unified Interface?

4452.Capture.PNG

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi ghdunn,

    There are many logics and code behind Qualify lead button, and these stuff will finally qualify a lead to an opportunity or contact.

    You could download Ribbon Workbench solution, find the Qualify lead button and click customize it command,

    then check source code (in a system web resource) in its command to read source javascript code of logic or routine.

    Due to its complex, you could directly execute the action QualifyLead to qualify a lead manually and convert it to an opportunity or contact as you want.

    Please take my answer in the thread as reference if you had requirement that qualifying a lead by customization parameter.

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/374035/how-to-execute-the-lead-qualify-code-without-clicking-the-button-in-dynamics-365-2019-release-wave-2

    Regards,

    Clofly

  • ghdunn Profile Picture
    235 on at

    Clofly,

    Thanks for this...seems to address what I am interested in...but it just leaps a bit too far for my current skills/knowledge.  

    When you say: "You could download Ribbon Workbench solution, find the Qualify lead button and click customize it command,"

    ..what are you referring to.  What screen do I go to 'download Ribbon Workbench solution'.

    In particular, I am interested in whether that logic can be exposed as part of the Model Driven Application.  

    thanks!

    ghdunn

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi ghdunn,

    1. Ribbon Workbench is a popular solution which could help us manage command bar button(ribbon button) easily, we can edit these buttons in GUI without to modify customization.xml in exported solution.

    You can download from its official web site:

    https://www.develop1.net/public/rwb/ribbonworkbench.aspx

    2. It will send a download link to your email, then you can import the zip file as solution into CRM.

    3. After you import it successfully, you can find the entrance icon in Settings > Solutions.

    pastedimage1576862126992v1.png

    4. As you mentioned, create a simple solution and only include Lead entity inside it.

    pastedimage1576862205496v2.png

    5. In Ribbon workbench page, you can see all buttons of lead entity after import the solution with lead.

    the Lead qualify button is in Form section(1),

    there are many same buttons for this function(2, qualify process is complex),

    right click button and select Customize Command,

    then the qualify command will appear(3),

    finally we can find the web resource which controls qualifying process(4).

    It's called Lead_main_system_library.js.

    pastedimage1576862332046v3.png

    6. Open browser and search the file in Source(chrome) or Debugger(firefox) tab, 

    I recommend Chrome, you can open the file in a new tab to view source code.

    In conclusion, could you share me your business requirement about how would you like to use the button in Model Driven Application?

    As what we know and see, this function is built with complex display rules and executing code,

    thus qualifyLead action is a simplified access to achieve system qualify lead feature.

    Regards,

    Clofly

  • Suggested answer
    ashish12 Profile Picture
    3,079 on at
  • cloflyMao Profile Picture
    25,210 on at

    Hi ghdunn,

    An opportunity record will always be created once we qualified a lead.

    A new account record will be created if the Company field in the lead record is set.

    If you had enable the wave 2 release, then you can decide to create only one type record:

    https://d365demystified.com/2019/08/08/qualify-lead-in-d365-ce-select-which-entity-records-should-be-created/

    You could take following article as reference for details about lead qualification:

    https://integent.com/dynamics-365-for-sales-lead-qualification/

    Please kindly point out whether I couldn't understand your requirement correctly.

    Regards,

    Clofly

  • ghdunn Profile Picture
    235 on at

    Clofly,

    You have provided me with a great amount of VERY useful information which I will be exploring in the next few days.  However, since you ask if you understand the requirement I am going to double back.

    my original question had two elements...one about the code behind Lead/Opportunity which you have answered brilliantly.  The other element was about how that is represented in Model Driven App.  If I open Sales Hub as a MDA, I see all of the Entities, Dashboards, BPFs etc.  My question was also designed to understand whether I could see the Qualify control button in that interface (see picture), and explore the code using that route?

    Many thanks for all of your help!

    ghdunn

    3835.Capture.PNG

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi ghdunn,

    1. As what Model Driven App has introduced, it's an environment which doesn't require code for System Administrator to build an App with essential components: 

    -> entities

    -> dashboards

    ->forms

    ->views

    >charts

    >business processes

    etc.

    You can see all components in this link.

    In conslusion, Model Driven App is a component-focused and no code design envrionment.

    For example, if we open any form of Lead entity, in pop-up form designer, 

    we'll find that we're only designing form fields and layouts, while command bar is not included in the editor.

    pastedimage1577064814970v1.png

    2. Form command bar and its buttons is defined as Ribbon, samely for the Lead qualify button, it's just one of the button on the ribbon.

    It uses underlying XML data to define what commands to display, when the commands are enabled, and what the commands do.

    We should create a solution with an entity, then check XML structure in exported customization.xml to see function in a specific ribbon,

    however, this process would be only suitable for developer, while Ribbon Workbench provides an near-OOB interface for user to explore them.

    Finally, it could be said that there is no direct relationship between Model Driven App and Lead Qualify button.(Ribbon button),

    the former is a no code design environment, while the latter requires code in most situations.

    Regards,

    Clofly

  • HarryZang Profile Picture
    240 on at

    When qualifying the leads (no matter in the Unified Interface or in the traditional form), the Dynamics 365 will trigger an action or an internal plugin,

    this step will create a new contact/opportunity.

    It is more like an out of box feature.

    The API document provides the details for this action

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/qualifylead?view=dynamics-ce-odata-9

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans