Script Action is not working

Chandresh
Tera Guru

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.?

event.PNG

13 REPLIES 13

Rahul Jain11
Kilo Guru

It looks like u_shifts is an invalid record. Could you please check you table name: u_shifts, is that correct?



Hi Rahul,



Yes, I have checked the table name it is u_shifts. Have you checked the link I have mentioned in the 2nd post. Any idea about it as per the KB article it seems there is some bug because I am also getting the same logs.


ServiceNow KB: PRB565663: Event generates error to EventRecord: getEventTarget() called with invalid...


Rahul Jain11
Kilo Guru

Hi,



Looks like an issue only with the log entries. Your records are getting inserted in the table, right?


No, unfortunately that's the main issue, the records are also not getting inserted in shifts table. That is why I made this script action very simple to check why records are not getting inserted. I have checked the event log and it is getting invoked but the Script written in the script action is not working.



Here is the dictionary entries of the Shifts table.


find_real_file.png


Rahul Jain11
Kilo Guru

Did you try the same on any OOB table? If it is not working any case then it is product bug, you have to register a case in HI then.



You can try one more thing, put your code in the script include and call it from the script action. See if that works?