- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 08:31 PM
Hello experts,
I tried creating an onLoad client script that would give an error message if a user in the caller field is inactive.
It is working fine with my default view since the caller field is present in my default view form. But it is not working on my custom view, wherein the caller field is remove in the form layout.
Do we have any of you have any idea of a way to make a client script work if the field is not present or visible in the form? Thanks.
Regards,
Vaine
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 05:47 AM
The client script can only access the data that appears client side on your form, so if the caller field isn't there you'll need to pass data to the client script. In your use case, that's probably a display business business rule. A display business rule runs server side on form load and allows you to write data to the scratchpad. You can then access that data from the scratchpad in the client script and show your field message.
Here's our documentation on display business rules, and I bet there are some pretty good examples on how they're used out in the community.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 05:47 AM
The client script can only access the data that appears client side on your form, so if the caller field isn't there you'll need to pass data to the client script. In your use case, that's probably a display business business rule. A display business rule runs server side on form load and allows you to write data to the scratchpad. You can then access that data from the scratchpad in the client script and show your field message.
Here's our documentation on display business rules, and I bet there are some pretty good examples on how they're used out in the community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 12:36 AM
Hello,
Yes thanks for the reply. I also found out this solution through trial and error. I found that it is possible via display business rule using g_scratchpad. But is it the correct behavior that this is not possible to execute in glideAjax. I also tried experimenting on GlideAjax and it did not work. Is that the supposed behavior in GlideAjax approach?
Regards,
vaine.