How to set assigned to field with one person name and else assigned to will be mandatory on RITM for

SHAIK MAHABOOB2
Tera Contributor

Hi Community,

 

I want to set assigned to field with one user name(Able Tutor) on particular condition else assigned to field will be mandatory.

 

Condition: Short description is Application support assigned to field need to set with Able Tutor.

else assigned to will be mandatory.

 

We can achieve this with client script or ui policy but not sure how i will prepared script for this.

Any one help on this?

1 ACCEPTED SOLUTION

Manmohan K
Tera Sage

Hi @SHAIK MAHABOOB2 

 

You can use below code in a client script for achieving your requirement

 

 

if (g_form.getValue('short_description') == "SSO Application Integration") {

        g_form.setValue('assigned_to', '62826bf03710200044e0bfc8bcbe5df1');  //sys_id of Abel Tuter

    } else {

        g_form.setMandatory('assigned_to', true);

    }

 

View solution in original post

6 REPLIES 6

Manmohan K
Tera Sage

Hi @SHAIK MAHABOOB2 

 

You can use below code in a client script for achieving your requirement

 

 

if (g_form.getValue('short_description') == "SSO Application Integration") {

        g_form.setValue('assigned_to', '62826bf03710200044e0bfc8bcbe5df1');  //sys_id of Abel Tuter

    } else {

        g_form.setMandatory('assigned_to', true);

    }

 

Manmohan K
Tera Sage

@SHAIK MAHABOOB2 

 

Keep in mind that the assignment group should be populated before filling Assigned to and assigned to user should be part of group selected. I am assuming you are doing those validations already before running code shared