SncTriggerSynchronizer.executeNow(current) How this works?

IamAmolB
Tera Guru

Hi Experts,

Do any one have idea how this(SncTriggerSynchronizer.executeNow(current)) works?

In our environment we are creating change ticket from this, not sure how and if the job contains any attachment it should attached that to change, any one have any idea how it works?

or what should i try to make it work?

Regards,

Amol Bavaskar

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Amol,



Any update on this?


I hope my earlier comment has answered your question.



Could you mark the answer as correct, helpful and hit like if you were able to achieve the requirement. This also helps in removing the question from unanswered list. Thanks in advance.



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Amol,



That line of code is present on the schedule job execute now button.


Basically it triggers the schedule job.


Although schedule jobs trigger as per the timing given, you can also trigger them from server side code and you should pass the object of schedule job record to be triggered in that executeNow() method.


Not sure about the attachment part.


But you can use the Attachment copy functionality to copy attachments from this job to change requests getting created from this schedule job



http://wiki.servicenow.com/index.php?title=Copy_Attachments_from_Record_to_Record#gsc.tab=0


Useful Attachment Scripts - ServiceNow Wiki


SN Pro Tips — Advanced Attachment Copy Util



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


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I am also using the same line of code like below .

SncTriggerSynchronizer.executeNow(current);

This line code executing as per time mentioned in schedule job But i don't want to execute as per the time it should work on execute Now explicitly.by using above line of code.

 

Could you please  help on this how to achieve.

Regards

Imam  

Hi,

I would encourage to post a new question as this is quite older thread.

Do create the question and share the link here

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Amol,



Any update on this?


I hope my earlier comment has answered your question.



Could you mark the answer as correct, helpful and hit like if you were able to achieve the requirement. This also helps in removing the question from unanswered list. Thanks in advance.



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader