How can we make BR override OOB UI action message?

Gaurangi Joshi
Tera Contributor

Hi All,

I have a requirement to make comments mandatory while approving the approvals for Knowledge Management Module.
For this functionality, we have created a BR which triggers when:-

GaurangiJoshi_1-1692374316828.png

And this is the script I am using in for setting comments mandatory:-

current.state = 'approved';
if (!gs.nil(current.comments))
current.update();
else {
gs.addErrorMessage(gs.getMessage("Comments are required when approving an approval"));
current.state = 'requested';
current.setAbortAction(true);
action.setRedirectURL(current);
}

And this is working, but we can still see the OOB message alongwith the message I have set when we try to approve without comment from the list view.
How can we override this behaviour?

GaurangiJoshi_2-1692374693627.png

Can someone please guide me on what steps to take to override this default behavior?

 

Thanks in Advance!

Gaurangi

 

 

5 REPLIES 5

RajeshkumarV
Tera Contributor

I am looking for same kind of overriding OOTB info messsage. Please help. 🙂