- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 01:33 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 02:22 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 02:41 AM
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);
}
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 02:53 AM
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