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

Can you try using below once

function markClose()
{
alert('To check'); //can be commented if required
g_form.setMandatory('comments',true);
gsftSubmit(gel('checkcomments'));
}

markingclose();
function markingclose()
{

new global.StateFlow().processFlow(current, '05a03d27c3123100d6d210c422d3ae18', 'manual');
current.state = 'rejected';
current.update();
/*if(!JSUtil.nil(current.comments))



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

}

Hey Jaspal. Thank you for your time.

It doesn't work 😞

Lorex
Kilo Contributor

Hey Jaspal. Thank you for your time.

It doesn't work 😞