On click of the Blueprint transition (Qualified or Not Qualified), the 'Convert' option should be enabled in the Lead module.

On click of the Blueprint transition (Qualified or Not Qualified), the 'Convert' option should be enabled in the Lead module.


On click of the Blueprint transition (Qualified or Not Qualified), the 'Convert' option should be enabled in the Lead module.

console.clear();
let convertButton = ZDK.Page.getButton('convert');
let leadStatus = ZDK.Page.getField('Lead_Stage').getValue();
console.log("leadStatus: ", leadStatus);
console.log("value: ", value);
if (leadStatus === "Qualified" || leadStatus === "Not-Qualified") {
    ZDK.Page.getButtons().find(a => a.getApiName() === "convert").enable();
    //  ZDK.Client.reloadPage();
}
else {
    log("Phone Number:");
    ZDK.Page.getButtons().find(a => a.getApiName() === "convert").disable();
}