Possible to Pass Variables Between Client Scripts? (LONDON)

Chris Sanford1
Kilo Guru

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?

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

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

View solution in original post

13 REPLIES 13

sachin_namjoshi
Kilo Patron
Kilo Patron

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

How do I make a field mandatory in a business rule?

You can abort transaction and provide error message like below

 

current.field_name.setError("Hello World");

 

Regards,

Sachin

Thanks, this is the solution I went with.