How to automatically populate assignment group field based on caller location BEFORE saving?

JordyZ
Mega Sage

Hi,

 

How do I make the incident form automatically populate the assignment group field based on the location of the caller before even saving the form?

 

Use case: I'd like the assignment group field to be immediately filled with the service desk of the caller's respective location from the moment the location is selected on the form.

 

There is a decision table that links the location with the assignment group, see picture in attachment.

 

How do I go about doing this? Thanks in advance.

18 REPLIES 18

Sebas Di Loreto
Kilo Sage
Kilo Sage

GlideRecord is not supported in client scripts for quite some time. 
Check here: https://www.servicenow.com/community/developer-forum/using-glide-record-in-client-script/m-p/1450364


If I helped you with your case, please click the Thumb Icon and mark as Correct.


I'm trying to puzzle together the answers you and @Basheer have provided, but I'm stumped.

If you read the post it says its not recommended and that its not supported in scoped apps.  Since this is for incident it is most likely not a scoped app.  Also the reason they give is possible performance impact do to it getting all of the fields for a record.  Which is why I mention that I would use it in this case because the table looks like it had 2 fields in it, so the amount of returned data is small.  I would not use it to get say an incident record where I only wanted 1 field value.

 

@DrewW 

Good points Drew.

I would still not use it since it is not recommended. I have seen this happening in the past where people used methods just because they worked and then they surprised when it doesn't work in workspace or mobile for example. I would still design it utilizing an Ajax call.

Thanks for your review.


If I helped you with your case, please click the Thumb Icon and mark as Correct.