
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 09:41 AM
I have the following requirement for the incident form: If the state changes to on hold, or the priority is escalated (changes to numeric value less than previous value), comments should be mandatory.
Sounds simple, but no luck in practice. My thought was to run two different client scripts, one on change of state and the other on change of priority. The problem is, in my client script on change of state I have no way to check if the priority was escalated or not. If the state changes from on hold back to something else I would want to make comments not mandatory, only if there is not a priority escalation.
Is there a way I could pass a flag from one client script to the other?
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 09:50 AM
You can achieve these requirements using business rule.
You can check if priority or state is changed, and then implement your validation in business rule.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 09:50 AM
You can achieve these requirements using business rule.
You can check if priority or state is changed, and then implement your validation in business rule.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 09:50 AM
How do I make a field mandatory in a business rule?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 10:38 AM
You can abort transaction and provide error message like below
current.field_name.setError("Hello World");
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2019 09:44 AM
Thanks, this is the solution I went with.