- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2016 10:38 PM
Hi All,
I have written the onLoad Client script on the Table.
var rec = new GlideRecord('sysauto_script');
rec.get('name', 'JSON Test4');
if (typeof SncTriggerSynchronizer != 'undefined')
SncTriggerSynchronizer.executeNow(rec);
else
Packages.com.snc.automation.TriggerSynchronizer.executeNow(rec);
But this is not executing the Scheduled Job. Please help me to solve this
Thanks
Pradeep D J
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2016 12:02 AM
By making slight change in script include this will execute
i removed the last line from Script Include type:'AjaxUtils'
Thanks
Pradeep D J
PS: Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2016 10:55 PM
You need to run SncTriggerSynchronizer.executeNow(rec) on the server. You can do this using GlideAjax.
Client Script:
function onLoad() {
var ga = new GlideAjax('AjaxUtils');
ga.addParam('sysparm_name', 'executeScheduledJob');
ga.addParam('sysparm_job_name', 'JSON Test4');
ga.getXML();
}
Script Include (assume the name is AjaxUtils😞
var AjaxUtils = Class.create();
AjaxUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
executeScheduledJob: function() {
var rec = new GlideRecord('sysauto_script');
if (rec.get('name', this.getParameter('sysparm_job_name'))) {
if (typeof SncTriggerSynchronizer != 'undefined')
SncTriggerSynchronizer.executeNow(rec);
else
Packages.com.snc.automation.TriggerSynchronizer.executeNow(rec);
}
},
type: 'AjaxUtils'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2016 12:02 AM
By making slight change in script include this will execute
i removed the last line from Script Include type:'AjaxUtils'
Thanks
Pradeep D J
PS: Hit like, Helpful or Correct depending on the impact of the response