How to fix null return value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2026 12:18 PM - edited 01-30-2026 12:20 PM
Hi All,
Here I'm returning sysID from script include and calling that in table filler condition, but it is always showing null
Script Include : client callable ( Glide AJAX enabled) ,
All application scopes
Roles: public
getBuisnessUnit: function() {
var sysID = '';
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id', gs.getUserID());
gr.addQuery('active', true);
gr.query();
if (gr.next()) {
sysID = gr.getValue('u_business_unit');
}
//return sysID.toString();
return 'ac26c204870221003ff35d88e3e3ec61';
},
return 'ac26c204870221003ff35d88e3e3ec61'; testing Purpose just returning one sysid , even that also but still NULL value showing