Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

Posted on by 50

Hi All,

I have requirement where i want to make a custom field called lead qualification comments as mandatory before user click on qualify lead button.

Can anyone please let me know how can we achieve this? As per initial requirement it is nice we can have pop up for the users to give a pop up to give the comments how ever it is also fine if we make this as mandatory with message lead qualification comments are mandatory.

*This post is locked for comments

  • Rajesh Chungath Profile Picture
    Rajesh Chungath 465 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    Open lead entity on crm ribbon workbench and call a javascript function on click and make the custom field mandatory (Business Required)

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    Hi ,

    As suggested above you can use custom js code inside ribbon button action. Call OOB button function inside your js function.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    You can achieve this by customising the Lead Qualify button with Ribbon Workbench to call custom JavaScript code. You can set field requirement levels with the following JavaScript:

    formContext.getAttribute(arg).setRequiredLevel(requirementLevel)
  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    either pre-validation or pre-operation will be fine, but mostly pre-Operation

    You need to register plugin step on "QualifyLead" message.

    Check these links for more details

    community.dynamics.com/.../when-to-use-the-pre-validation-stage-in-the-plugin-pipeline

    community.dynamics.com/.../216706

  • ingu Profile Picture
    ingu 50 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    If i write a plugin this plugin will be registered in pre operation or pre validation stage

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Want to Make A Custom Field As Mandatory on Lead Qualify Button Click

    hi..

    you can achieve this multiple ways..

    1. Customize Lead Qualify button - and call your own script before lead qualification and check comments field has any value.. if not then throw error message

    here is a link to inject your code before actual event happen

    mahadeomatre.blogspot.com/.../inject-your-code-before-crm-button.html

    2. another option : Plugin

    Write plugin on qualification.. when comments does not have any details then throw error to users.

    hope this will help..

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans