Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Reject Solution case

Lorex
Kilo Contributor

Hello, 
i want to know if there is a way to make mandatory a comment when a customer click on reject solution button. I need because OOTB a customer can reject a CASE resolution without explaining why he is rejetcing the case resolution.

I asked some days ago here in the community, and the suggestion was "modify the UI Action as follow":

find_real_file.png


This is the script:

new global.StateFlow().processFlow(current, '05a03d27c3123100d6d210c422d3ae18', 'manual');

current.state = 'rejected';


if(!JSUtil.nil(current.comments))


current.update();


else{


gs.addErrorMessage("Comments are required when rejecting an approval");


current.state = 'requested';


current.setAbortAction(true);


}
function markclose()
{
g_form.setMandatory('comments',true);
gsftSubmit(gel('checkcomments'));
}



But, the button is still not working. No comments are mandatory if i reject case resolution.

Can you help me?

Best regards,
Lorex

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi Lorex,

 

Try using something as below

function markclose()
{
g_form.setMandatory('comments',true);
gsftSubmit(gel('checkcomments'));
}

markingclose();
function markingclose()
{

new global.StateFlow().processFlow(current, '05a03d27c3123100d6d210c422d3ae18', 'manual');
current.state = 'rejected';

/*if(!JSUtil.nil(current.comments))
current.update();


else
{
gs.addErrorMessage("Comments are required when rejecting an approval");
current.state = 'requested';
current.setAbortAction(true);
}*/

}

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

Still not working 😞

Reason being markClose() being used in onClick field & markclose() being used in Script.

 

Note: IT is case sensitive. Make the same for both & it should work.

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

I think this is not the reason. This is the ui action form. markClose() was yet on onclick. Thank you anyway for your answers

find_real_file.png