facing issue with Ui Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:11 PM
Hi Team ,
under closure information , I have created 2 custom fields . please check screenshot .
when we click on ' COMPLETE' or States changes to ' closed ' these two custom become mandatory .
I have created UI Policy for this ,
But it is not working
can anyone please help me here ... what was the mistake here . please provide steps .
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:17 PM
Hi @nameisnani,
Create Client Script:
(function executeRule(current, previous /*null when async*/) {
if (current.state == 'Closed') {
g_form.setMandatory('u_custom_field1', true);
g_form.setMandatory('u_custom_field2', true);
} else {
g_form.setMandatory('u_custom_field1', false);
g_form.setMandatory('u_custom_field2', false);
}
})(current, previous);
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:18 PM
Hello @nameisnani
In Condition of UI Policy you have selected is, Instead of that pls select changes to.
Pls mark my solution as Accept, if you find it helpful.
Regards,
Samaksh Wani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:37 PM
@Samaksh Wani In UI POlicy i don't see changes to option .
@Yashsvi which cilent script i should wirte
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:42 PM
Hello @nameisnani
In the Same UI policy, You will find one check Checkbox, On Load. Check it and then try.
Pls mark my solution as Accept, if you find it helpful.
Regards,
Samaksh Wani