SncTriggerSynchronizer.executeNow(schImport)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 02:52 AM
Hi ,
i want to know what does "SncTriggerSynchronizer.executeNow(schImport)" returns.
it returns a sysid but i have checked everywhere but i dont know from which table it belongs.
can i pass a variable to scheduled import while calling it via script ?
Regards,
Abhay
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 02:58 AM
It definitely belongs to : sysauto table or Scheduled Job table.
SncTriggerSynchronizer function will only allow a single paramater, so you can go to scheduled job table and try searching by sys ID to get the record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 03:04 AM
But it returns different sysid everytime i execute it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 03:13 AM
Do you know from where are you calling this line?
If yes, you can add up these lines:
var x= SncTriggerSynchronizer.executeNow(schImport);
var gr = new GlideRecord('sysauto');
gr.addQuery('sys_id',x);
gr.query();
if(gr.next())
gs.log(gr.name);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 03:24 AM
it will log the sysid of schedule job .
i need what SncTriggerSynchronizer.executeNow(schImport) returns when i use it server side.
var schImport=new GlideRecord('scheduled_import_set');
schImport.addQuery('sys_id',"");
schImport.query();
if(schImport.next()){
var i = SncTriggerSynchronizer.executeNow(schImport);
gs.print(i);
}