- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2018 11:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 12:11 AM
Hi Sachin,
Here are the steps:
1) create a data source with some file as attachment xls, csv etc
2) create transform map, field maps etc as usual
3) create a schedule data import and attach this data source to this data import. keep it active false since you will be triggering it from schedule job
4) use below script in your schedule job to execute the data source
var schImp_GR = new GlideRecord('scheduled_import_set');
schImp_GR.addQuery('name','<NameOfDataImport>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this will work in global scope
//gs.executeNow(schImp_GR); // this will work in scoped app
}
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 12:11 AM
Hi Sachin,
Here are the steps:
1) create a data source with some file as attachment xls, csv etc
2) create transform map, field maps etc as usual
3) create a schedule data import and attach this data source to this data import. keep it active false since you will be triggering it from schedule job
4) use below script in your schedule job to execute the data source
var schImp_GR = new GlideRecord('scheduled_import_set');
schImp_GR.addQuery('name','<NameOfDataImport>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this will work in global scope
//gs.executeNow(schImp_GR); // this will work in scoped app
}
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 03:31 AM
Hi Ankur Bawiskar Its Working, thanks you....