Script Action is not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 06:08 AM
I have invoked an event by business rule and that event is triggering fine. I have checked that in the event log.
The main issue is I have created one script action corresponding to that event but that script action is not working. All I am doing in that script action is creating records.Please check attached snapshot.
Is there any issue with the script action script.?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 09:58 AM
Sure , I will give it a try and come back with my findings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 11:34 AM
I think you may have something else going on than just the Script Action. I found this when researching the same getEventLog() message you were. I did a quick test with a new event that creates a glide record, and everything seemed to work fine for both an OOTB table and a new table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 11:55 AM
Hi Chandresh,
May be it is just a timing issue and you may want to run your insert record asynchronously.
var job = new GlideRunScriptJob();
job.scheduleScript("new CustomScriptInclude().insertShift()");
// if Customscriptinclude is your defined script include
alternatively, you can pass it as string too:
var script = "var gr= new GlideRecord('u_shifts');";
script += "gr.initialize();";
...
script += "gr.insert();";
var job = new GlideRunScriptJob();
job.scheduleScript(script);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 05:35 AM
Hi Chandresh,
I too face the same issue, You could do one thing please check your calling of gs.evenQueue() function . The function must be called for single record only not for multiple records