- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 10:39 AM
Experts,
I have a scoped application OnDemand syauto_script creating a custom event. This scheduled event (gs.eventScheduled : code below) is basically creating a script which kicks a script action
gs.eventQueueScheduled('x_abc_scope.trigger_next_sch', scheduleGr, "trigger_next_job", scheduleGr.getUniqueValue(), gdt);
The script action contains a script which needs to trigger a schedule script execution (sysauto_Script).
When the scheduled event runs, I am not able to see the script action 'script' not getting executed. Below is the script within the script action. The script action is created on the scoped app.
// here parm2 is coming from the event
try {
gs.info('Trigger next schedule job starting <--');
var schedGr = new GlideRecord("sysauto_script");
if (schedGr.get(event.parm2)) {
gs.executeNow(schedGr);
gs.info("Triggered for sysauto_script");
}
}
catch (ex) {
throw new Error('Unable to find sysauto_script with sys_id passed from event '+ex.message);
}
sysevent created
Thx
ram.
Solved! Go to Solution.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 04:37 PM
Closing the thread.
The issue was with my event condition check. As I said, the issue was something silly and now its all working fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 10:47 AM
Are you getting any errors in system logs when this script action executes?
Also, it may be cross-scope, RCA access issue between sysauto_script and your custom scope.
Create required cross-scope, RCA records and check if it resolves your issue.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 10:54 AM
Thank you for the response Sachin.
I do not see any cross scope access privilege errors on the logs..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 12:31 PM
I am also able to execute the script from a global scope .
Infact, this was working and the only change which I did was creating a dedicated event processor for processing the next set of events which gets created by the 'scheduled job' which this script is suppose to create.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 12:33 PM