make mandatory additional comments in approval

armanoj
Mega Sage

Hi , 

in approval table make comments mandatory when they get approve , but get another error message along with custom error message  as "Invalid value on Update". Usinge BR I tried to make comments mandatory.

if (gs.nil(comments)) {

        current.setAbortAction(true);
        gs.addErrorMessage('Comments are mandatory when approving or rejecting.');
        return;
    }


is it possible remove that error message.
armanoj_0-1781694154871.png

 



1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@armanoj 

from where are the users approving or rejecting?

Portal or native?

View solution in original post

10 REPLIES 10

Mark Manders
Tera Patron

Everything they added, will be reversed. You would better just use a UI policy to make comments mandatory. 

Attachments are handled differently, so you would need a business rule for that. However, it's strange that an approval would need a mandatory attachment. 

I used BR to make attachment mandatory its working fine but getting one more error message . @Mark Manders 

Without sharing the error message or showing what you did, it's impossible to even start guessing what is going on.

Ankur Bawiskar
Tera Patron

@armanoj 

from where are the users approving or rejecting?

Portal or native?

in Service portal