- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 05:24 AM
I want to change the owner of few reports as the previous owner has left the organization. How can I do this?
I tried to change the crated by user from the list view but it's not clickable although the list editing is checked.
Any suggestions on this?
Thanks in advance!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 05:37 AM
Hi Vaishali,
Changing the owner of reports is not possible via the UI but you can always run script and do it if you want. Please take help of background script below to update the created by of the report.
var gr=new GlideRecord('sys_report');
gr.addQuery('sys_id','c825d02fdb8623001fbca0f2ca96190e'); //Sys Id of report
gr.query();
if(gr.next()){
var name=gr.title;
gs.print('Name of report '+name);
gr.user= '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.created_by_user = '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.update();
}
Note: Run above script in Background scripts and change the sys_id of the report and users accordingly.
If my answer helps then please mark it Helpful or Correct!
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 05:37 AM
Hi Vaishali,
Changing the owner of reports is not possible via the UI but you can always run script and do it if you want. Please take help of background script below to update the created by of the report.
var gr=new GlideRecord('sys_report');
gr.addQuery('sys_id','c825d02fdb8623001fbca0f2ca96190e'); //Sys Id of report
gr.query();
if(gr.next()){
var name=gr.title;
gs.print('Name of report '+name);
gr.user= '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.created_by_user = '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.update();
}
Note: Run above script in Background scripts and change the sys_id of the report and users accordingly.
If my answer helps then please mark it Helpful or Correct!
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 06:18 AM - edited 08-07-2023 06:18 AM
Thanks it worked!!