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,...
Unanswered

Customize Lead Disqualify Button

(0) ShareShare
ReportReport
Posted on by 483

Hello,

I want to customize disqualify lead button in a way that when specific status reason is selected on disqualify button i want to check one field on form whether value contains if not show alert message and make field required.

i have tried this on save event of form with below code but iam not getting selected status reason value instead of that iam getting initial loaded value.

Please suggest is there way to get selected status reason value or any other possible way to handle this??

if (executionContext.getEventArgs().getSaveMode() ==15 && formContext.getAttribute("statuscode").getValue() == 4 )
{
executionContext.getEventArgs().preventDefault();
formContext.getAttribute("contact").setRequiredLevel("required");
var alertStrings = { confirmButtonLabel: "Ok", text: "contact is Required", title: "Required" };
var alertOptions = { height: 120, width: 260 };

Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function success(result) {
console.log("Alert dialog closed");
},
function (error) {
console.log(error.message);
}
);


}

I have the same question (0)

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 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans