How to disable/enable Lead Qualify Button based on user role only specific user should click the qualify

Hi Community,

Any idea, how we can disable/enable qualify button based on user role in both section and edit page. Only specific user should click qualify.

Like 0

Like

2 comments

*Following*

You can conditionally show and hide the qualify button using something like this in the LeadSection:

define("LeadSectionV2", [], function() {
  return {
    entitySchemaName: "Lead",
    methods: {
      initLeadManagementButtonVisibility: function(entity) {
        this.callParent(arguments);
 
        var showQualifyButton = false; //set show/hide conditions
        this.set("LeadManagementButtonVisible", showQualifyButton);
      }
    }
  };
});

Note: you'd need to add the same code to LeadPage as well. Also, you can do the same with the disqualify actions menu items visibility using this: this.set("DisqalificationButtonVisible", false); 

This post has some details on how to do an esq query to check if a user is in a role https://community.bpmonline.com/questions/esq-query-find-role

Ryan

Show all comments