Can deleting user preference cause any issues?

Ankita Kolhe
Tera Contributor

Hello Community,

 

I have 18 user preference record that needs to be deleted. I'm concerned & not sure if it will cause any issue in performance or might be any other issue.

 

Can someone pls help with the suggestions?

 

Thanks,

Ankita Kolhe

3 REPLIES 3

Rajdeep Ganguly
Mega Guru


Deleting user preference records in ServiceNow should not cause any performance issues. However, it's important to understand that these records store user-specific settings, so deleting them may affect the user experience. Here are some considerations:

1. User preference records store individual user settings like their chosen language, time zone, list layouts, etc. Deleting these records will reset these settings to their defaults.

2. Before deleting, ensure that these records are not critical for any business processes or user tasks. If unsure, it's better to back up these records.

3. To delete user preference records, you can use the 'sys_user_preference' table. You can filter the records you want to delete and use the 'Delete' option.

4. Alternatively, you can use a script to delete specific user preference records. Here's a sample script:

javascript
var userPref = new GlideRecord('sys_user_preference');
userPref.addQuery('name', 'your_preference_name');
userPref.query();
while(userPref.next()){
userPref.deleteRecord();
}

Replace 'your_preference_name' with the name of the user preference you want to delete.

5. Always test the deletion in a sub-production instance before applying it to the production instance.

6. Monitor the system and user feedback after the deletion to ensure no critical functionality is affected.

Remember, it's always a good practice to have a rollback plan in case something goes wrong.


nowKB.com

For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/

For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER

Is there any OOTB schedule job which removes the user preference? Or can we run a script to delete all user preference and just have the default ?

Dr Atul G- LNG
Tera Patron
Tera Patron

No effects, as it is preferences only.

 

Do in group of 3 or 5.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************