Fix script to change the table label and its column label
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I am creating a fix script to change a table's label (in my app scope) and its column label upon upgradation, I am doing it by querying the sys_db_object and sys_dictionary table and then using .update() to change the table label. When I try to run the fix script I get an error:
GlideSession message was modified by sanitization. [message=Write operation against 'sys_db_object' from scope '<my_app_scope>' has been refused due to the table's cross-scope access policy][sanitized=Write operation against 'sys_db_object' from scope '<my_app_scope>' has been refused due to the table's cross-scope access policy]
Security restricted: Write operation against 'sys_db_object' from scope '<my_app_scope>' has been refused due to the table's cross-scope access policy
What should I do, it runs if the fix script is created in global scope but I need it in my application scope so I can ship the application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @maitripatel
can you confirm that the fix script is written in the same scope?
Eventually you can test it in PDI using a background script, there is also a choice to select scope.
Let me know about your progress
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hey @GlideFather
Yes, the fix script is written in the same scope i.e. my_app_scope. I tried running it but it shows the same error. I tried creating a cross-scope privilege for the same but no luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
But why using script and complicate when it can be done easily from UI?
Simply change the table label in sys_db_object
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am using a script to ensure that my table labels are changed during app upgrade scenario