javascript: gs.getUser().getRecord().getValue('location') is not Working in Record Producer Kingston
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2018 02:36 AM
Hello There,
I have created a Location reference field with table as cmn_location and in the default value i have given as javascript: gs.getUser().getRecord().getValue('location') [have even tried with javascript: gs.getUser().getLocation() but no luck] which is not working in my Work instance which runs on Kingston. When i try same on my personal Kingston instance it is working as expected. Much appreciated if any suggestions on how to work around on this..
Thanks in advance!
- Labels:
-
Service Catalog
- 12,761 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2018 02:42 AM
Hi Sai,
Are you on same patch for kingston?
I don't see any reason for it being not populated? Did you check for that logged in user is having any location or not?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2018 02:54 AM
Hello Ankur,
KPatch 6 on personal and Patch 7 on work instance.
Yup have tried with multiple users where location is not empty still getting no value on location field.
Sai!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2018 04:53 AM
Hello Sai,
Is this because you have your custom field on user table? I believe location field is already present on user table.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2018 06:08 AM
Hi Ankur,
I have found out that the way i'm trying to get location will not work for scoped applications.
Thank You!