Do not automatically create modules for import tables extending Import Set Row Table

Siva Kedari Vee
Mega Guru

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!

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Siva Kedari Vee 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

Could you just help me how the module gets created when we create a data source "Is there any Script" that does this Action. 

@Siva Kedari Vee 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Siva Kedari Vee 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader