Do not automatically create modules for import tables extending Import Set Row Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 02:22 AM
Hi All,
I need help with the below requirement.
When a new import set table is created extending Import Set Row, ServiceNow automatically generates a module under Import Set Tables application. These are not needed and are cluttering up space and making navigator menus load longer.
I.e., when a table is created from a Data Source (as part of Data Source create), when "Easy Loader" is being used and system creates a module under Import Set Tables Menu under System Import Sets, and when the table is created through the dictionary UI (there is a checkbox "Create Module" that is checked by default).
So can we have the ability to choose whether I need a module to be created under Import Set Tables When I use Data Source for creating the Import Set Table.
@Chuck Tomasi Any help would be appreciated.
Thanks in Advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 02:35 AM
No ability to have that option.
The only option is when you create table via UI and keep that "Create Module" uncheck
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
10-17-2022 02:38 AM
Could you just help me how the module gets created when we create a data source "Is there any Script" that does this Action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 02:55 AM
I am currently not sure. But I believe it comes from platform level and we might not have access to block this module creation.
You can disable it by using before insert BR on Modules table and check if the table extends Import set then deactivate it by unchecking the Active checkbox
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
10-17-2022 03:05 AM
Something like this in Before Insert BR on sys_app_module
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var tableName = current.name;
var gr = new GlideRecord("sys_db_object");
gr.addQuery("name", tableName);
gr.addQuery("super_class", "sys_import_set");
gr.query();
if (gr.hasNext()) {
current.active = false;
}
})(current, previous);
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