- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 03:04 AM
Hello!
I need to find the way how to show UI action on form only if operator using "UI16" and hide it if "Polaris UI" is used.
Any suggestions?
Br,
Victor
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 05:43 AM
Hi Victor,
I believe if you have not enabled 'Polaris UI' for all users then there in User Preferences you would have used a property 'glide.ui.polaris.use' , you can look this property and how this is configured ( means there are some certain conditions to enable for all or enable for some sort of users this New UI) in your organization/PDI, and on top of that you can use condition to show UI.
Hope this will help you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 05:43 AM
Hi Victor,
I believe if you have not enabled 'Polaris UI' for all users then there in User Preferences you would have used a property 'glide.ui.polaris.use' , you can look this property and how this is configured ( means there are some certain conditions to enable for all or enable for some sort of users this New UI) in your organization/PDI, and on top of that you can use condition to show UI.
Hope this will help you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 12:36 AM
Hello!
Thanks, its working. Just was curious if there is some native method.
Here is my script (method in custom script include):
userEnabledPolaris: function(usr) { //usr - user's sys_id, gs.getUserID();
var gr = new GlideRecord('sys_user_preference');
gr.addQuery('name', 'glide.ui.polaris.use');
gr.addQuery('user',usr);
gr.query();
if ((gr.next())&&(gr.value=='true'))
return true;
var gr2 = new GlideRecord('sys_user_preference');
gr2.addEncodedQuery('name=glide.ui.polaris.use^userISEMPTY'); // system default
gr2.query();
if ((gr2.next())&&(gr2.value=='true'))
return true; //no personal setting, use global "true"
return false;
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 01:14 AM
@Victor Ogrizko Very frankly i could not find there is any native approach if you are enabling New UI in mixed mode.
For you reference, we had found an issue and created a HI case for this that if you make system field false and try to save/update record in both UI & script, sometimes it makes true automatically.
So we have a workaround to make workflow(false) while updating through script for this.
Hope this will help you.