- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 08:19 AM
I have a bunch of custom columns added to the sn_si_incident table. I would like to remove them from sn_si_incident and place them in a table that extends sn_si_incident (leaving the base table as OOB).
Instead of manually creating each field, there are a lot of them. I would like to create a script to create the extended table and add the custom fields. Saving me a lot of time and possible typing mistakes.
Every article i see uses Packages.java.util.HashMap() and new GlideTableCreator(table_name , table_name). Neither can be used in a scoped application. Is there a way to do this in a scoped application?
Any assistance would be greatly appreciated.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 09:12 AM
See below, tested = works.
1) create Script Include in global
2) create Fix Script in your scoped app + execute Fix Script
3) see table created (in my example in HR Core scope)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 09:12 AM
See below, tested = works.
1) create Script Include in global
2) create Fix Script in your scoped app + execute Fix Script
3) see table created (in my example in HR Core scope)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 09:41 AM
That worked, I didn't think through the solution you sent previously. Makes sense once I saw your code.
Thank you, I have marked as correct answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 08:35 AM
Also be aware of the number of multi line fields. ServiceNow advice is not to have more then 10 or 12 (I have to look it up on the docs). Obviously this is on the save side, you could actually have a bit more.
This is, the number of string fields with 255+ max length on your custom table + the ones on the table you are extending from.
Mentioning this, because this could cause database issues.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field