- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎06-17-2022 10:54 AM
I have recently worked on enabling Next Experience and it's really a very cool to be on new level of ServiceNow experience. Some of features are getting their journey ended here with San-Diego or in coming upgrade Tokyo.
Problem after enabling Next Experience : I will just consolidate all faced problem worked on homepage even after converting into dashboard.
1. Homepage is no more showing to customers, 2. Converted dashboard does not have owner & 3. customer does not have a specific landing page as per their own interest after enabling new UI
Somehow i have managed to handle above all with the help of some articles and some created custom background script.
Let's start applied solution by me what i think is one of good solution, there might be different ways to do same thing but it's worth of sharing my experience with you.
1. Homepage is no more showing to customers : Yes it's true and we all aware but in latest upgrade we still can make showing homepage by making false this property (com.glideapp.home.deprecate_homepages) , but ServiceNow said you can not use any more after Tokyo upgrade. So it' good to be ready and make customer to adopt this with same homepage feeling but in dashboard .. There are two ways to convert all homepages into dashboards.
First way : This is best & more convenient & ease to use. Install the Homepage deprecation help tool and then navigate to dashboard 'Homepage Deprecation' there you will get a pop with instruction to enable flow. So cool upto here but no figure/records would display on dashboard until you wont run flow or wait to run . It fetches just 1k record at a time . So here better to run flow through background script with putting some condition or you can also run multiple times flow manually to go on flow designer until there is no increment of Homepages count of dashboard.
Script to run flow through background script/scheduled job whatever you think is good for you : sn_fd.FlowAPI.getRunner().flow('sn_home_page_depr.populate_homepage_migration_status_table').inBackground().run();
Once you complete this steps , you can see total homepage count on widget (Report- Homepages Not Deprecated).
Next part is quite interesting and it takes time to convert into dashboard. Be careful while doing on prod as it's trigger event so there is possibility to have lots of ready event in queue. so converting homepages you can do in two ways either clock on figure of Homepages Not Deprecated report, it will take you to list view. There you can select rows and click on list action 'convert' , but imagine if you have more than 10k records, so better to use below script till your count comes zero in print -
var gr = new GlideRecord('pa_homepage_migration_status'); gr.addNullQuery('decision');gr.setLimit(4000);gr.query();
gs.print(gr.getRowCount());gr.setValue('decision', 'converted');gr.updateMultiple();
Once you complete this you have now converted all homepages into dashboards.
Another Way : Without installing tool 'Homepage deprecation help tool' but i will suggest first way is more easy to use and will suggest to go i am explaing just to be aware of available option on platform. Here you will have to get all sysid from table (sys_portal_page) and then pass into " var dashboardSysIds = new SNC.PortalPagesMigration().convertHomePagesAndgetAssociatedDashboards(SysIds[i]);" . But sys_portal_page contains both homepages & dashboard , very frankly i don't know how to separate only homepage on this table but script will give you null if record is dashboard or you will get sysid of converted homepage . Here you will become culprit to get owner of every dashboard by default so you will have to make sure changing owner of getting sysid .
We have completed important part & we have all converted dashboards and you can see this to navigate on dashboard 'Homepage deprecation' . I will follow first way and will explain next two.
2. Converted dashboard does not have owner : Click on figure of Converted Homepages on dashboard. All converted dashboards wont have owner because one homepage shared with multiple users will have empty owner. If you open any dashboard there owner field would be empty , we can update all together using below script , you can change setLimit or can run multiple times this script with checking list view on table (pa_homepage_migration_status) with filter (owner!=NULL^dashboard.owner.nameISEMPTY)
var gr = new GlideRecord('pa_homepage_migration_status');
gr.addEncodedQuery('decision=converted^state=3^owner!=NULL^dashboard.owner.nameISEMPTY');
gr.setLimit(3000);gr.query();gs.print(gr.getRowCount());
while(gr.next()){var grd = new GlideRecord('pa_dashboards');grd.get(gr.dashboard);grd.query();
if(grd.next()){grd.owner=gr.owner;grd.setWorkflow(false);grd.update();}}
3. customer does not have a specific landing page as per their own interest : We have option to show specific converted dashboard on landing page to customer, so they have same felling like homepage when they login There are some scenario here
Scen1 : Default after enabling next experience, customer will have last used dashboard in previous login
Scen2 : All customers have one landing page : Update value of system property (glide.login.home).
Scen3: Show converted dashboard to those who had set homepage on landing page : Use below script it will create a user preferences for all who had homepage on landing page otherwise will show last used dashboard to other users.
var gr = new GlideRecord('sys_user_preference');
gr.addEncodedQuery('name=homepage^description!=deprecated homepage^ORdescription=NULL');
gr.setLimit(3000);gr.query();gs.print(gr.getRowCount());while(gr.next()){
var gr_mig=new GlideRecord('pa_homepage_migration_status');
gr_mig.addEncodedQuery('decision=converted^state=3^home_page.sys_id=' + gr.value);
gr_mig.query();while(gr_mig.next()){
var up=new GlideRecord('sys_user_preference');
up.addEncodedQuery('name=my_home_navigation_page^user=' + gr.user);
up.query();if(!up.next()){up.name='my_home_navigation_page';
up.value='$pa_dashboard.do?sysparm_dashboard='+ gr_mig.dashboard;
up.type='string';up.user=gr.user;up.setWorkflow(false);up.insert();gr.description='deprecated homepage';
gr.setWorkflow(false);gr.update()}else{
//up.description='enable default landing page';
up.value='$pa_dashboard.do?sysparm_dashboard='+ gr_mig.dashboard;
up.setWorkflow(false);up.update()gr.description='deprecated homepage';gr.setWorkflow(false);gr.update()}}}
Just FYI: I have also seen after enabled new UI that user gets landed on one specfic dashboard even user does not have a property (my_home_navigation_page) in user preference. This happens due to other property (com.snc.pa.ui.preferences_dashboards) which keeps just sysid of dashboard. But i have seen this my_home_navigation_page override.
Above is just my experience on next experience to share experience. Hope this will be useful to others who comes under this scenario , please test above code on small number of records before running on prod. Happy to know/learn more on this if anyone wants to share .
Thanks, Ab
- 3,600 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very interesting! thank you!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for this post - that's quite helpful.
What is the easiest way to change the default dashboard of a single user to another dashboard? The scenario I have is that this specific user used to have access to a OOTB dashboard however as we changed their permissions he no longer has access to it as he does not have the role which allows him to see it.
The inconvenient part is that every time he logs on the system he gets the following message:
I am looking to get him to land onto a different dashboard (we are using SSO, in case it helps).
Thank you!!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@PaulaaO navigate to 'User preferences' -> filter user & name='my_home_navigation_page' -> create a new record if no record with fields name='my_home_navigation_page', user=user_name & value=$pa_dashboard.do?sysparm_dashboard=sys_id_of_dashboard
or if exists record the change value=$pa_dashboard.do?sysparm_dashboard=sys_id_of_dashboard
Hope this will help you.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Abhay Kumar1 - I used the Homepage Deprecation tool to convert the homepages to dashboards. It seemed to work, but while testing I found that the roles were not set up on the newly converted dashboards. As a result, users are seeing too many dashboards (many of which display no data due to lack of access). Did you encounter this issue?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@cynlink1 what i am aware ceeated any dashboard will not visual to all users unless you have not provided read/write access on dashboard.
Yes admin users can see all.
I did not see such kind of scenario on my production instance and no one even complained about it.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Abhay Kumar1 - One more question for you...is there a way to retire the personal dashboards without triggering the notification to the owner for approval? I would use this method to retire 'My Homepage X' homepages in bulk.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@cynlink1 you can use below article to retire and if you want to retire in bulk then take script runing in background when you select retire action :
Even you can delete unwanted converted dashboard all together with making setWorkflow(false);
Try this if works for you.