Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to make comments field mandatory when approval request rejected through List Choice?

Deepika N
Kilo Contributor

Hi team,

please guide me How to make comments field mandatory when approval request rejected through List Choice?

Regards,

Deepika

find_real_file.png

10 REPLIES 10

Darshani Sambar
Giga Contributor

Hi Deepika,

 

Condition: 'requested'&&(gs.hasRole('approval_admin') || isApprovalMine(current)

Script:

if(!current.comments.isNil()){

 current.state='rejected';

 current.update();

}

esle{

gs.addInfomessage("Comments are mandatory");

}

 

 

Please hit Correct/helpful based on impact.

Thanks

Darshani sambare