I need to get the locations parent which is the Region. Its not pulling for me.

Allen12
Tera Guru

This code gives me the location.

Allen12_0-1669058824669.png

I tried modifying to this to get the parent:

Allen12_1-1669058892620.png

Here is the record:

Allen12_2-1669058937628.pngAllen12_3-1669058950613.png

Any help is always appreciated.

 

2 REPLIES 2

Aman Kumar S
Kilo Patron

Hi @Allen12 ,

Not sure why are you trying to use GlideRecord in a client script, but it is highly recommended not to use gliderecord in client side scripting.

Exhibit A:
sing Glide record in client script 

So instead of GlideRecord, you can use GlideAjax, the GlideRecord portion you can place inside a function in a Script include and just make a callback using getXMLAnswer.

Ex:

https://www.servicenow.com/community/developer-articles/getxmlanswer-vs-getxml/ta-p/2307589

 

 

Best Regards
Aman Kumar

Mike_R
Kilo Patron
Kilo Patron