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

Prinssi
Mega Sage

Hi Shaik,

 

You might want to consider creating an assignment rule for this scenario.  After that, you could set a UI Policy, where state is not new, and assigned to is empty, then make assigned to mandatory.

 

Prinssi_0-1686236282764.png

Prinssi_1-1686236304314.png

 

Hi Prinssi,

 

Thank you for your response.

I am applying the same logic but not luck, still assigned to is not filling automatically.2.png1.png3..png

Did that record exist already?  Or was it a new record?  The assignment rules run when a case is created on the designated table.

It is new record.