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 06:17 AM
Also, I checked the script logs as well. On checking the logs I did some random search and found below KB article related to below logs.
Does anybody have any idea about this??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 09:02 AM
I'm assuming that the commented out code is what's not working?
If so, it's choking on "shifts" because "shifts" isn't defined.
For example,
us1.u_shift_management_number = shifts.u_number;
The code says, where/what is 'shifts' ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 09:28 AM
Hi David/ Rahul,
Thanks for your response. I believe if the code is commented out then it will not check that code. It will simply skip the commented out part. However, I removed the commented out part from the Script Action code and still it is not working. I am getting the same output as above. Below is the snapshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 09:27 AM
Agreed with David.
shifts object is not defined in your script.