tiagomacul
Giga Sage

How to remove the bookmark?

How to remove a favorite?

Sometimes we need to edit a module but it's not enough when another thing could enable access to the user, ACL for example, however, it could be needed to take off/remove these bookmarks, when how could we do it?

it's not so easy  as just edit a module, but it's the first step

 

ImageDescription
find_real_file.png01. Search by a module that needs to update
find_real_file.png02. Click on edit
find_real_file.png03. on the Visibility tab
find_real_file.png04. Click Edit
find_real_file.png05. Edit roles available as need
find_real_file.png06. Click Done
find_real_file.pngfind_real_file.png07. Click update

 

Creating a script to remove favorites

ImageDescription
find_real_file.png01.Navigate to >> System Definition > Fix Scripts
find_real_file.png02. Click New
find_real_file.png03. type a name of fix script
find_real_file.png04. Type a name for Description
find_real_file.png05.Type the script
find_real_file.png06.Click Update
find_real_file.png07. Run Fix Script

 

var grBook = new GlideRecord('sys_ui_bookmark');
grBook.addEncodedQuery('urlSTARTSWITHu_ppm_templates_list.do');
grBook.query();
while (grBook.next()) {
    var myUser = gs.getUser().getUserByID(grBook.user);
    if (!myUser.hasRole('ppm_pmo') && !myUser.hasRole('ppm_project_manager')) {
        grBook.deleteRecord();
    }
}


 

 

image

Summary

Fix Script official documentation

 

 

 

 

Version history
Last update:
‎07-26-2022 09:42 AM
Updated by: