Mandatory the attachment

Venky Kshatriy2
Tera Contributor

Hi Team,

 

Based on the assigned group need to do attachment should be mandatory. If any known's could you pls help me on this

VenkyKshatriy2_0-1727155654949.png

 

6 REPLIES 6

Eshwar Reddy
Kilo Sage

Hi @Venky Kshatriy2 

Please see the screenshot below for the code required to make attachments mandatory.
Cline script 

EshwarReddy_0-1727157492036.png



Script include

EshwarReddy_1-1727157510109.png

 

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution

 



KarthikB9365919
Tera Contributor

Hi @Venky Kshatriy2 

By using before business rule we can achieve this scenario

(function executeRule(current, previous /*null when async*/) {

    // Add your code here
    if(current.hasAttachments()!=true){
        gs.addInfoMessage("please add attachment");
        current.setAbortAction(true);
    }

})(current, previous);