- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:03 AM
Hi all,
I have a requirement that 2 fields be made mandatory before users can set the catalog task to Closed Complete.
I created a client script to handle the UI component. This works just fine, with one huge exception:
When users change the state via the drop-down option, the Client Script does not kick in and they are able to by pass the validation. How can I make sure that the validation rule is applied regardless?
Thanks much.
M
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:07 AM
You will need to implement the logic server-side to make sure the validation rule is applied regardless. So you could use an Abort business rule, something like below should work (replace Transfer reason & Short description empty field conditions with your fields accordingly):
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:30 AM
Very strange, haven't seen that not work before. Is your business rule before insert/update?
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:32 AM
Hi Christopher,
Before update.
Thanks again!
M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:36 AM
Hmm that is weird, I'm not sure why that flag isn't working. You could try to abort the action from the business rule script instead as below:
current.setAbortAction(true);
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:38 AM