- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 07:06 AM
Hi,
I am having trouble creating a onLoad client script/business rule to auto populate the department field on the incident form, the data will need to be coming from the sys user table/form.
see screenshot.
can anyone help?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 07:17 AM
Hi,
There are two ways you can solve this. Either by using a business rule, that will set the department value after the Caller is set, and the record is saved (so the end user will not see the department until the record is saved).
This alternative is pretty straightforward,
Create a business rule that runs on condition change of caller and caller is not empty.
In the set fields section, set the department field to caller.department.
The other way is to create a onChange client script which uses GlideAjax to fetch the department value from the server whenever the caller changes.
This alternative is a bit more complicated, I can recommend this article to get started learning to create GlideAjax.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 07:17 AM
Hi,
There are two ways you can solve this. Either by using a business rule, that will set the department value after the Caller is set, and the record is saved (so the end user will not see the department until the record is saved).
This alternative is pretty straightforward,
Create a business rule that runs on condition change of caller and caller is not empty.
In the set fields section, set the department field to caller.department.
The other way is to create a onChange client script which uses GlideAjax to fetch the department value from the server whenever the caller changes.
This alternative is a bit more complicated, I can recommend this article to get started learning to create GlideAjax.