The CreatorCon Call for Content is officially open! Get started here.

Issue with error message in BR.

vidhya_mouli
Giga Sage

A BR checks for certain condition and updates the record only when the conditions are met. If the condition fails, it must display a custom error message (only custom error message).

 

I have the following 2 lines of codes for this purpose:

        gs.addErrorMessage("You do not have permission to update this record.");
        current.setAbortAction(true);

 

However this display the following:

vidhya_mouli_0-1700674321399.png

 

How can I avoid the "Invalid update" message form getting displayed? I want only the custom message.

 

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@vidhya_mouli The second message comes from the platform when setAbortAction(true) is called. Some DOM manipulation can be tried to hide it via a client script but using DOM manipulation is not encouraged due to browser compatibility and upgrade related issues.