-
Notifications
You must be signed in to change notification settings - Fork 904
Enhancement to create "sp_favorite" along with "sys_ui_bookmark" #2549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement to create "sp_favorite" along with "sys_ui_bookmark" #2549
Conversation
This script retrieves and displays the top 5 records where the logged-in user is mentioned, providing links to those records.
snamjosh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code isn't working.
I am getting below error on running this code as background script.
`SyntaxError: Expression expected at line 6, column 1
3: var userCriteria = "name=Jessica James"; // Add an encoded query of users from sys_user table
4:
5: var fav = new GlideRecord("sys_ui_bookmark");
==> 6: fav.get(srcFav);
7:
8: var portalFavRec = new GlideRecord("sp_favorite");
9: portalFavRec.get('81b370e683bcfa9025abc070ceaad3fe'); // glide record of favorite record.
`
Please fix your code.
|
@snamjosh Please pass the sys_id of bookmark to be copied over to users in line 1. This code worked for me and inserted sp_favorite and sys_ui_bookmark successfully through background script. |
|
@snamjosh can you look review this? |
|
@ravichandra1998g can you have a look? |
PR Description:
This Enhancement will create the sp_favorite for the same user query through fix script along with sys_ui_bookmark
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions