Hello Everyone,
I have a progress bar that changes its status based on approval status. However, it requires a manual page refresh to reflect the changes in the progress bar. To address this, I've added a refresh button. Now, I want this button to trigger automatically whenever the progress bar status changes. Can anyone provide guidance on how I can achieve this using a custom handler?
Currently, I've written this code with the assumption that the record is saved whenever the status changes.
{
request: "crt.SaveRecordRequest",
handler: async (request, next) => {
const schemaName = "UsrNewProductsOnboardingformpage";
const buttonId = "Button_qef55yg";
const button = request.$record.$Model[schemaName].$Buttons[buttonId];
if (button) {
button.instance.execute();
console.log("Button clicked");
} else {
console.log("Button not found");
}
return next?.handle(request);
}
}