BUI: Cancel Save on Incident workspace based on condition
Content
Hi All,
I have an requirement to disable/Cancel Save.
1. Created dropdown and button in BUI and uploaded in incident workspace tab.
2. Based on the dropdown value i displayed one error message on the button click
after displayed the error message i want to disable Save button, I used the below code but it is not working
ORACLE_SERVICE_CLOUD.extension_loader.load("CUSTOM_APP_ID" , "1")
.then(function(extensionProvider)
{
extensionProviderIExtensionProvider.registerWorkspaceExtension(function(WorkspaceRecord)
{
WorkspaceRecord.addRecordSavingListener(customImplementation);
}
);
}
);
function customImplementation(parameter)
{
// Custom implementation goes here.
parameter.getCurrentEvent().cancel();
}