Setting a default Theme not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 07:48 AM
I'm trying to cause the default theme of my instance to be a particular theme. I've copied the user preference records seen in other posts as can be seen here:
using cache.do or gs.invalidateCache(); is not causing the theme to change.
Any help would be appreciated!
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 12:58 PM
Hi Kerry,
There are two different cases here:-
1) you want to modify the OOB theme - "System theme" so that it will be applied to your entire instance
2) You want to create a custom theme which anybody can select from the list of available themes.
If you are trying for the first one you need to work on the system properties(sys_properties.LIST) which gives those colours.
Mostly all those colour properties would be starting with "css." and having a key word "colour/color" in it.
You should modify these and test it out.
If you are trying for the second one you can navigate to "sys_ui_theme" table and check the existing themes and mimic them and modify as per your needs to create a new custom one.
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful if it helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 01:07 PM
I think my question was a bit unclear. I am using the out of the box themes, I just want to force a theme to be the default theme for a particular instance. This has been asked a few times and the response is to create a user preference record like above.
In this case, the sys_id in the value is for the "Blimey" theme. The record above should force all users to the Blimey theme when the instance cache is flushed, but it is not behaving as expected.
Thanks for answering!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 01:11 PM
Have you gone thought and deleted any user preference with the name glide.css.theme.ui16 that has a user in the user field? To have the system override the theme you need to delete all user preferences that have another theme.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 01:23 PM
Hi Bricast,
Take a backup of the below applied filters and run this script.
DeleteUI16ThemePrefs();
DeleteConcoursePrefs();
function DeleteUI16ThemePrefs() {
gs.log("starting deleteUI16Prefs");
var pref = new GlideRecord('sys_user_preference');
pref.addQuery('name','STARTSWITH','glide.css.theme.ui');
pref.query();
gs.print(pref.getRowCount());
while(pref.next()){
pref.deleteRecord();
}
gs.log("Finished deleteUI16ThemePrefs");
}
function DeleteConcoursePrefs() {
gs.log("starting deleteConcoursePrefs");
var pref = new GlideRecord('sys_user_preference');
pref.addQuery('name','STARTSWITH','use.concourse');
pref.addQuery('system',false);
pref.query();
gs.print(pref.getRowCount());
while(pref.next()){
pref.deleteRecord();
}
gs.log("Finished deleteConcoursePrefs");
}
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful if it helps)