I want to make assignment group mandatory

PRAGHATIESH S
Tera Expert

Hi,

I want to make assignment group mandatory in all the state even in new state, but while create new that time it should not be mandatory after save the incident it will be mandatory.

 

Can anyone tell me, how to achieve it

2 ACCEPTED SOLUTIONS

Najmuddin Mohd
Mega Sage

HI @PRAGHATIESH S ,

You can use the on-load client script.

if(!g_form.isNewRecord()){

 g_form.setMandatory('assignment_group');

}


If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

View solution in original post

Robbie
Kilo Patron
Kilo Patron

Hi @PRAGHATIESH S,

 

You can easily achieve this via a UI policy. Essentially in the script (As shown below), you can check to see if the record is new or not. (Whether its been created or not)

 

Use the following syntax in the 'Execute if true' script area:

function onCondition() {
    if (!g_form.isNewRecord()) {
		g_form.setMandatory('assignment_group', true);
    }
}

 

Screenshot 2024-11-29 at 10.38.57.png

 

To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.





Thanks, Robbie

View solution in original post

5 REPLIES 5

Juhi Poddar
Kilo Patron

Hello @PRAGHATIESH S 

This can be achieved by onLoad client script

Add the following script:

if (!g_form.isNewRecord()) {
    g_form.setMandatory('assignment_group', true); // Make mandatory for saved records
} else {
    g_form.setMandatory('assignment_group', false); // Not mandatory for new records
}

 This is tested in my PDI and it works. Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar