UI Action

dmahendran
Tera Contributor

I have a requirement on the Case table case record to make the Resolution Code field mandatory when resolving a case, only for users in the CAB Approvers group.

The case is resolved through a UI Action. When the UI Action is clicked, the state changes to Resolved immediately. Before completing the action, the Resolution Code field must be enforced as mandatory so the case cannot be resolved without it.

Any assistance would be much appreciated!!

1 REPLY 1

Bhavya11
Kilo Patron
Kilo Patron

Hi @dmahendran ,

 

You need to code in the UI action. Open the UI action , one onclick function called check below 

 

if (g_user.hasRole('cab_approver')) {

        if (g_form.getValue('resolution_code') == '') {

            g_form.setMandatory('resolution_code', true);

            alert('Resolution Code is mandatory to resolve this case.');

            return false;

        }

    }

 

 

Thanks,

BK