- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 06:32 AM
Hello Everyone!
I'm trying to add some modules say Project related to user favorites upon assigning it_project_manager role but with no luck. Somebody please point me in right direction to achieve this.
Thanks in Advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:26 AM
Hi @mokshasree
You can try creating an after insert business rule on the sys_user_has_role table with condition like Role :: IS :: it_project_manager
And in the script section do your modules insertions to the sys_ui_bookmark table with fields
user, pinned , title, URL, color, order values.
The order field value has to be dynamically generated based on users existing favourites, to do this in your script query the sys_ui_bookmark table orderByDesc on order field and get the highest order value the user has, if there are no recorda the order would be 0.
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:50 AM
@mokshasree Yes, it is possible. you need to add the records to sys_ui_bookmark_group table first and while inserting the favorites you should set group field with the sys_id of the group record you inserted.
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:26 AM
Hi @mokshasree
You can try creating an after insert business rule on the sys_user_has_role table with condition like Role :: IS :: it_project_manager
And in the script section do your modules insertions to the sys_ui_bookmark table with fields
user, pinned , title, URL, color, order values.
The order field value has to be dynamically generated based on users existing favourites, to do this in your script query the sys_ui_bookmark table orderByDesc on order field and get the highest order value the user has, if there are no recorda the order would be 0.
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:08 AM
@AnveshKumar M Thanks for the solution. Can we also add groups?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:50 AM
@mokshasree Yes, it is possible. you need to add the records to sys_ui_bookmark_group table first and while inserting the favorites you should set group field with the sys_id of the group record you inserted.
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 07:13 AM
Thanks Anvesh, it worked.