Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Skripting standard change creation versus Business Rule

MartinKolodzey1
Tera Contributor

I searched and found a solution to create a standard change from Script.

 

Nevertheless I ran into the situation that the script was aborted with the attached message, sttaing that a Business rule prevented the creation of the standard change because of an "inactive" template.

I tripled checked and even created a modified version of but it did not work.

 

So I came up with the solution to add "chg.setWorkflow(false)". But i do not think that this is not the way it is suposed to work?!  Maybe one of the SN developers might check it.

 

 

 

 

 

1 REPLY 1

GlideFather
Tera Patron

Hi @MartinKolodzey1,

 

For script or coding related questions it really helps to share that actual code..


Also, when you say “from script” then it’s unclear what kind of script you used. Is it a scheduled job, a flow, a fix script, ... or something else?


The more precise is the question the better and more accurate the answer I can give you ;))

_____
Answers generated by GlideFather. Check for accuracy.