SncTriggerSynchronizer.executeNow(schedJob)

Naveen Velagapu
Mega Guru

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 ???

20 REPLIES 20

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?)


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.


Can you please describe your scenario in more detail?


What are the reasons for using a scheduled job?


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


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.