- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-17-2024 06:37 AM
Am trying to get the user location for onchange of a user field(contract administrator). I have wrote a script a=include and using onchange client script. AM getting the alerts for cleint script but no logs getting hit insidie the script include.
Script include:-
client callable :- checked
Application :- global
Script:
Client script:-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-17-2024 08:06 AM
I have rearranged the script and it worked

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-17-2024 06:41 AM
@Roshini Could you please update your script include script as follows.
var UserDetailsUtil = Class.create();
UserDetailsUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getUserValues: function() {
var location = '';
var userSysID = this.getParameter('sysparm_userID');
var GrUser = new GlideRecord("sys_user");
GrUser.addQuery("sys_id", userSysID); //comparing sysID
GrUser.query();
if (GrUser.next()) {
//getting user location
location = GrUser.location+''; //converted to string.
}
return location;
},
type: 'UserDetailsUtil'
});
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-17-2024 06:45 AM
Thanks for your quick response, I tried the modifications but still not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-17-2024 08:06 AM
I have rearranged the script and it worked