How to populate the department field on the incident form

Kiet1
Tera Contributor

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?

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

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.

View solution in original post

1 REPLY 1

OlaN
Giga Sage
Giga Sage

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.