We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to hide multiple error message on the CSM/FSM workspace

SomashekarB6490
Tera Contributor

I have requirement when case status is close/Resolved , restrict the user with adding the attachment in CSM/FSM workspace

 

I have written BR before insert on sys_attachment table 

 

(function executeRule(current, previous /*null when async*/) {
    var caseRecord = new GlideRecord('sn_gsm_los_cases');
    caseRecord.get(current.table_sys_id);
    if (caseRecord.state == '3'|| caseRecord.state == '6') {
        gs.addErrorMessage('Attachments cannot be added or removed when the state is closed or resolved.');
        current.setAbortAction(true);
    }
})(current, previous);
 
But the error message is throwing twice as below 
 
SomashekarB_0-1730287579244.png

Please suggest how to show only one error message!

0 REPLIES 0