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

Ethan Davies
Mega Sage
Mega Sage

The invalid update is posted every time the .setAbortAction is called, this is default system behavior and I am pretty sure it cannot be removed.

@vidhya_mouli A workaround to this could be to create an onSubmit Client Script to prevent the submission, you wouldn't get the inavlid update message then.

@vidhya_mouli please mark one of the answers related to your question as correct. It will help others who have a similar question / issue find the answer in the future 🙂

SanjivMeher
Kilo Patron
Kilo Patron

This is the default behavior. But if you want to block a user from updating, you should add ACL for it.


Please mark this response as correct or helpful if it assisted you with your question.