Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 09:37 PM
Hi @Mark Roethof ,
Thankyou for your replies.
I did try using the 'user_id' in my script as below and prior using gs.getUserID(), but received the
"user_id" is not defined
getBizValue();
function getBizValue() {
var userRec = new GlideRecord('sys_user');
userRec.get(user_id);
if(userRec.u_business=='Digital Solutions' && userRec.active == 'true' ) {
answer= true;
}
else
{
answer=false;
}I did run it in background script.
The u_business custom field is a string type field.
Any help what I am doing wrong and to correct the script?
Thanks