SncTriggerSynchronizer.executeNow(schImport)

abhay1069095
Giga Contributor

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

8 REPLIES 8

anurag92
Kilo Sage

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.


abhay1069095
Giga Contributor

But it returns different sysid everytime i execute it.


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



abhay1069095
Giga Contributor

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


}