Auto update the department and email ID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Auto field update based on the caller ID. It was working fine before but i am not what went wrong it is not working now.
Please someone help.
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
if it worked fine before, then what changed recently?
what debugging did you do?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @nishanthip ,
department: userGr.department.toString(), email: userGr.email.toString()
Here try removing .toString() & user "userGr.getDisplayValue('department')"..
Also there can we issue with newvalue according to me try instead g_form.getValue('caller_id').
OLD----> ga.addParam('sysparm_caller_id',newValue);
Replace ----> ga.addParam('sysparm_caller_id',g_form.getValue('caller_id'));
If my response helped mark as helpful and accept the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @nishanthip ,
Your all script seems fine .You are saying it was working fine before and now its not working , can you please once check in script include there is any change done . Glide ajax callable checkbox is checked ? Its accessible from all application scope ? may be here in ga.addParam('sysparm_caller_id',newValue); newvalue dont getting valid data can you please also check this by g_form.addInfoMessage(newValue) ;
what value is getting stored in newValue. You can also try g_form.getValue('caller_id') instead of newValue here ga.addParam('sysparm_caller_id',newValue) ;
This can be also reason if ACLs changed recently, the Script Include may not be allowed to read:
sys_user.department
sys_user.email
Also Try this :
g_form.setValue('u_department', data.department || '');
g_form.setValue('u_email_id', data.email || '');
Also check user that you are selecting he had valid email and department or not .
If this helps you then mark it as helpful and accept as solution.
Regards,
aditya
