Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Error message for business rule

Raj133
Kilo Contributor

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

2 REPLIES 2

Ankur Bawiskar
Tera Patron

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

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

Mark Roethof
Tera Patron

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

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn