How can i trigger SCHEDULE import from script?

Ankit Kumar6
Tera Contributor
 
1 REPLY 1

Gangadhar Ravi
Giga Sage
Giga Sage

Below is one sample script 

	var exportGr = new GlideRecord("scheduled_import_set");
	exportGr.addQuery("sys_id", "<RecordSysId>"); // sys_id of the record which you will be creating for scheduled import in step (a)
	exportGr.query();
	if (exportGr.next()) {
		gs.executeNow(exportGr); // this is for scoped app
		// SncTriggerSynchronizer.executeNow(schImp_GR); // this is for non scoped app
	}