- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 07:36 PM
HI Need help
I am able to configure UI policy where in if someone is rejecting a change by going into approvals then it will ask for reason or comments for rejection (attachment 1)
However i noticed that when a approval right clicks and reject a change (attachment 2) it does not ask fro reason but straightway rejects the change
how to ensure every time change is rejected it asks for a reason , weather its rejected by right click
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 08:08 PM
Hi @karan15 ,
You can try creating a business rule like the one below, so that It will if the comments are filled in or not for rejection, and prevents rejecting the approval from Right Click even.
And, use the code below in Advanced Tab, business rule script.
(function executeRule(current, previous /*null when async*/) {
if(gs.nil(current.comments)){
gs.addErrorMessage('Please fill comments with reject reason. Please open the approval record and fill in the comments to reject.');
current.setAbortAction(true);
}
})(current, previous);
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 08:04 PM
@karan15 you will have to add onCellEdit client script on the approval table where you make use g_form.setMadatory('field_name',true);
So it will not allow to reject in list view.
Hope this will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 08:36 PM
thanks can i get more info on CellEdit client script on the approval table on how to configure it please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 10:51 PM
@karan15 please follow this article video a good demonstration about how to create onCellEdit client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 11:09 PM
can you please share link to article video thanks