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

rad2
Mega Sage

Approval, reject and request are UI actions. you can add a message in the ui action 

find_real_file.png

Jagadeesh R1
Tera Expert

Hello Deepika,

 

           I too had encountered with similar requirement in our project. Since the field have to be mandatory at the related list records, we have created a business rule in approval table. Basically the business rule will display an error message to enter the comments in the approval records before approval or rejection and abort the action to not to make any updates. I hope this could be good for your requirement. 

 

Thanks and Regards,

Jagadeesh

 

 

 

Can you share the snapshot of the BR you're referring to? I ask this because Comments is a Journal field and will always return empty on load. It will be great if you can share what's working for you.

Hello,

 

         I have used before update business rule with conditions having state is rejected and the below is the script I have used.

if(current.comments==""){


       gs.addErrorMessage("Please go into the Approval Record to provide a Reason for Rejecting.");
       current.setAbortAction(true);


}else{


       return;


}

 

Regards,

Jagadeesh