How to auto populate the logged in user details using onload client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2022 01:43 AM
Hi All,
I have a requirement where I have created multiple variables - RequestedFor, RequestedBy, Location, City, Country, MobileNumber, ManagerName and incidentLists
1.user opens the form above details auto populate with logged in user
2.on change of user, above details to be changed auto change based on the user change
3.incidenlists var only be visible on the form once the all the user details entered
4.populate all the list of incidents raised by selcted user - reqfor
Please help me to achieve this requirement
Thanks&Regards,
Sweety.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 07:34 AM
I think you are missing the brackets, In default value:
javascript:gs.getUser().getRecord().getValue('country');
javascript:gs.getUser().getLocation();
If you want display value:
javascript:gs.getUser().getRecord().getDisplayValue('city')
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 07:37 AM
If you are working in global, it should work fine.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 07:46 AM
I'm working global, then also it's not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 08:09 AM
You location and city fields are string or reference?
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:15 AM
location is reference, city and country are single line text