onComplete transform script

NR3
Tera Expert

Hi All,

I had created onComplete transform script couple of months ago to generate event whenever import set importing is completed, that event eventually generates email notification to my team stating import has been completed.

Until yesterday whenever data loads email used to trigger once with onComplete transform scripts, now if i load 100 records 100 events/email notifications are generated.

Please let me know what could be the issue.

Thank you
Reddy

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Reddy,

onComplete will run only 1 for complete import set. Did you try adding log statements and check how many times onComplete is getting executed.

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

i have checked the event logs, it triggered 100 times on one data load.

As of i know, this is the only script generating the event.

 

If u see the below screenshot, the only different i find is 'Table' field is added since yesterday load, on 23rd it wasn't updated though no code changes done in prod instance.

 

The onComplete script as below:

gs.eventQueue("Transform.map.event", current, source);

 

Please help.

find_real_file.png

Hi Reddy,

Any update on this?
Can you mark answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Reddy,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader