- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 06:45 AM
A roundly 592 records of Emp co-ordinator field got Default user name ,
How can i make field empty at a time to all records.
My script is not working:
var grd=new GlideRecord('sys_user');
grd.addEncodedQuery('u_emp_no=NULL');
//grd.addEn('u_emp_no=NULL');
grd.query();
while(grd.next())
{
current.u_emp_manager= '';
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 07:33 AM
Chanikya
Please navigate to-- system definition>>Scripts- Background from the filter navigator and run this script
Script:
var str = "employee_number=NULL";
var gr = new GlideRecord('sys_user');
gr.addEncodedQuery(str);
gr.query();
while(gr.next()){
gr.u_emp_manager = '' ;
gr1.setWorkflow(false);
gr1.autoSysFields(false);
gr.update();
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 08:18 AM
Hi Prateek,
It is working fine, thanks..!