Client Script

Rishabh_N
Tera Contributor

I need to show an alert message if the manager of the caller (from the caller field) is the same as the manager of the assigned-to user (from the assigned_to field) on a form. Both caller and assigned_to are reference fields to user records.

1 ACCEPTED SOLUTION

Slava Savitsky
Giga Sage

If you only need to do this on form load, the optimal approach would be to do this check in a display business rule and store the answer (true or false) in the g_scratchpad object. You would then be able to retrieve this information in an onLoad client script and show an alert message if needed.

 

If, however, you need this check to happen dynamically when the agent selects a caller and/or an assignee, then you would need a client-callable script include which you would then invoke from an onChange client script for the relevant field (e.g. Caller or Assigned to).

View solution in original post

2 REPLIES 2

Slava Savitsky
Giga Sage

If you only need to do this on form load, the optimal approach would be to do this check in a display business rule and store the answer (true or false) in the g_scratchpad object. You would then be able to retrieve this information in an onLoad client script and show an alert message if needed.

 

If, however, you need this check to happen dynamically when the agent selects a caller and/or an assignee, then you would need a client-callable script include which you would then invoke from an onChange client script for the relevant field (e.g. Caller or Assigned to).

Rishabh_N
Tera Contributor

Thanks Sir