SncTriggerSynchronizer.executeNow(schedJob)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 07:07 AM
hi all,
i am trying to execute a sceduled import from background using SncTriggerSynchronizer.executeNow(schedJob).
i am holding the return value of above in a variable and printing it
var schedJob = new GlideRecord('scheduled_import_set');
if(schedJob.get('name', 'naveen_test')){
var a =SncTriggerSynchronizer.executeNow(schedJob);
gs.print(a+'naveen');
}
each time it is printing different sys_id , but unable to identify to which table that sys_id belongs to.
i queried dynamically for all tables that have that sys_id , but i couldnt get any positive result.
any idea to which table that sys_id belongs to ???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2016 05:49 AM
Nothing here. I suspect Kalai is correct. It's a temporary record that is only on the system while the script is running. Once completed, it's removed.
Can you tell me what the objective of finding that record is (other than a curiosity exercise?)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016 02:39 AM
actually i am triggering a scheduled job from a workflow, The next activities should continue once the import set transformation got complete.
When implementing that, i tried this .
if that sys_id is related to either import set or job related , i can use in workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016 02:46 AM
Can you please describe your scenario in more detail?
What are the reasons for using a scheduled job?
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016 02:54 AM
my requirement is to refresh record by connecting to external db.
so i used workflow (includes other scenarios)
1.on clicking button workflow will execute a schedule job with dynamic query in data source
2. here , in the workflow i want to wait till the record loaded by data source got processed.i specifically need import set.
3. As there is no direct relation ship to record --> import set it is a bit tricky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016 03:06 AM
You can trigger an import directly from your script using methods of the GlideImportSetLoader class. The process runs synchronously and returns true or false depending on whether the import completed successfully. Have a look at DataSourceLoader script include in your instance for a sample usage.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/