Error message for business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2019 10:03 AM
Good afternoon,
I am getting error message for business rule condition
condition: javascript: new global.ResourcePlanAutomation().incidentStart(current);
Exception (TypeError: undefined is not a function. (sys_script.9be0fa2ddbc963406601f6531f96195f.condition; line 1)) occured while evaluating'Condition: javascript: new global.ResourcePlanAutomation().incidentStart(current); ; Filter Condition: stateIN6,7,8^urgency!=1^EQ' in business rule 'Check for Open Child Records' on incident:INC01013212; skipping business rule
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2019 10:19 AM
Hi Raj,
Can you share the screenshot?
there is no requirement to add javascript:
directly call that script include function like below; just ensure it returns true or false as boolean
new global.ResourcePlanAutomation().incidentStart(current);
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2019 10:19 AM
Hi there,
Have you checked only using in your condition field:
new global.ResourcePlanAutomation().incidentStart(current);
So without the javascript part.
(also not sure is the global is needed, though just give it a try)
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field