- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2022 03:51 PM
We have been on legacy workspaces for about a year and a half, so our users have created quite a few "My Lists" in the legacy workspace. It appears that these will not be available (migrate) into configurable workspaces and every user will have to manually recreate each "My List" they have configured. Is that correct? Is it possible to write a script to recreate them all? Thanks!
Solved! Go to Solution.
- Labels:
-
Workspace : Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 08:06 AM
Hi Dennis,
I agree with Mark that this is probably a good opportunity to see if it's time to refresh your my lists. That being said, it should be simple enough to write a script that copies the agent workspace my lists [sys_aw_my_list] to configurable workspace my lists [sys_ux_my_list]. It looks like those forms are almost identical but you'd obviously want to test extensively.
You could also build out a record producer or button that lets individual users bring their old my lists into the new workspace or start from scratch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2023 05:37 AM - edited ‎08-23-2023 05:52 AM
Hey Zrebak,
I am dealing with the same issue. I need to move the users list (sys_aw_my_list) from Agent Workspace to Configurable Workspace (sys_ux_my_list) but I cannot access the sys_ux_my_list table since it is in a private scope. Can you give more details on the work around you came up with please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 02:11 AM
Hi, sorry for late reply.
This is the script that worked:
var total = 0;
var bms = new GlideRecord("sys_ui_bookmark");
bms.addQuery("url", "CONTAINS", "_list.do?");
bms.addNotNullQuery("user");
bms.query();
while (bms.next()) {
temp = {};
temp.title = bms.title;
var user = new GlideRecord("sys_user");
user.get(bms.user);
temp.username = user.user_name;
var regex = /^\/?(.*)_list\.do.*_query=(.*)/;
var match = bms.url.toString().match(regex);
var test = regex.test(bms.url.toString());
if(match != null && test) {
var tableName = match[1];
var query = match[2];
temp.order = bms.order;
var inject = new GlideRecord("sys_aw_my_list");
inject.initialize();
inject.setWorkflow(false);
inject.autoSysFields(false);
inject.title = temp.title;
inject.table = tableName;
inject.condition = query != null ? query : '';
inject.order = temp.order;
inject.sys_created_by = temp.username;
inject.sys_created_on = new GlideDateTime();
inject.sys_updated_by = temp.username;
inject.sys_updated_on = new GlideDateTime();
inject.update();
total++;
}
}
gs.info("AW lists injected: " + total);
Create a Fix script out of it, export out the XML, change the scope from global to the private scope, reimport and execute.
