Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Copying bookmarks to another user's profile

alliej428
Kilo Contributor

Hi-

Is there a way to copy over bookmarks from one user's profile to another?   I've looked but haven't found a way to do so, and I'm not sure if this is possible.

Thanks!

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Option 1: Copy them manually by going to sys_ui_bookmark.list, filter for the user and bookmarks you want, open each, replace the user name, right click the form header and select "Insert".



Option 2: Write a script to filter and copy them. This is a bit more involved and a knowledge of JavaScript and the GlideRecord API.



GlideRecord - ServiceNow Wiki


View solution in original post

15 REPLIES 15

Community Alums
Not applicable

I've been trying to figure out the same every time I come across this task...  Let us know if you figure it out!

The fields for the icon and color are (unsurprisingly) called icon and color.

find_real_file.png

If you are copying a record, be sure to include those values. Example:

target.icon = source.icon;
target.color = source.color;

Marcin Kroszel
Kilo Guru

[The below XML solution doesn't work but I will leave it here for the others]

I've found a different non-scripting method to perform copy/paste of bookmarks from one account to another.

Steps:

  1. Navigate to Bookmarks,
  2. Filter by records which should be copied,
  3. Export xml 
  4. Edit the xml with Notepad++
  5. Copy sys_id of a user where you want to copy bookmarks to
  6. In Notepad++ select sys_id, click CTRL + H and replace all values
  7. Do the same as above (point 5 & 6) for user's display_value
  8. Save xml
  9. Import xml to your instance.

I don't know if this is a bug free method but so far it worked for me. 

I created my own script and managed to copy --> paste bookmarks from one account to another as well but the syntax is not as advanced as presented above by @Peter de Bock 🙂

I would be careful of that method because the original records from sys_ui_bookmark each have their own sys_ids and if you upload those back to the same instance, you are basically overwriting the old records since sys_id is the system's coalesce value to determine uniqueness.

And this is exactly what happened 😄 At least if someone tries to do the same he will stop after reading this 😛