ankit_gupta1
Tera Expert

Hello friends,

                                          I got a requirement , i have to create default global bookmark based on roles , so when ever any new user logged in to instance , based on role default bookmark (favorite) will be created.

For this i created a custom table where i have created 3 fields

Label   -     type

Role         -     reference field   --- sys_user_role (table)

URL           -   URL

Short_description (title)   -   string

Create record based on role in this table.

Now create a before business rule on sys_user table and check condition last login changes from empty to anything (first time login).

Check for the user roles and based on the role fetch record from above custom table and insert them into sys_ui_bookmark table.

Below i have attached update set that contain custom table and business rule.

I have created Default Favorites for ITIL and end users .

May this information will help you.

Please mark as helpful.

Comments
nayanawadhiya1
Kilo Sage

Hey Ankit,



Thanks for sharing it is helpful.


komaladsul
Kilo Guru

Hey Ankit,



Thanks for sharing it is helpful.


jarodm
Mega Guru

From the links above


Modifying UI14 Bookmark Appearance and Behavior - ServiceNow Guru



One note on the references in these documents on color and appearance. It looks like this changed in either UI15 or UI16. The icon info has been split out into 'icon' and 'color'.



My recommendation: Add the 'Icon' and 'Color' fields to your form and list view


find_real_file.png



I'll do some additional research into this and see if I can get a full list of all of the options.



JarodM


ankit_gupta1
Tera Expert

I found the solution . in business rule i mapped the field "icon" and "color" and "module" , so now i am able to make reference of module


ankit_gupta1
Tera Expert

Default favorites based on role working fine but one issue i am facing right now " when user first time login on mobile app they are not able to see any favorite , they have to refresh navigator or logout again login , i don't want these additional action ."


My requirement is when users login first time ,they will able to see favorites.


Is there any way to auto refresh mobile app navigator as well as desktop navigator


ctomasi you can help me on this issue


Chuck Tomasi
Tera Patron

Hi Ankit,



It sounds like a bug.



I recommend reaching out to customer support. I'll be interested to hear what they have to say.


HI Service Portal - ServiceNow


Contact Support | ServiceNow


surya123
Mega Guru

Did anyone got a solution to this.


I have a custom table created. When I add fav, it just dont show on the mobile app unless i manually make them Fav in the mobile.


It worked well for other custom module. Unsure of what is wrong with this new one.


Robert_Cartwrig
Tera Expert

Hi Ankit,



Thank you for providing this...works like a charm.



Regards,


Robert


ankit_gupta1
Tera Expert

Robert@welltok

 

Welcome!!!!!!!!

 

Charlie21
Kilo Contributor

Hi there,

 

I've just tried this and unfortunately, it's not worked in my Dev environment on Kingston. I must be doing something wrong? What format should the URL be in - is it the full link that's required?

 

Thanks,

 

Charlie

Version history
Last update:
‎01-30-2017 11:05 AM
Updated by: