sys_trigger

PRADEEPREDDY GU
Tera Expert

how to create a sys_trigger from Business rule in service now

1 ACCEPTED SOLUTION

This is just an example script 

You need to enter the column names which you want to enter in scheduled job

gr.name 

gr.run_as

gr.period

 

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

View solution in original post

4 REPLIES 4

Basheer
Mega Sage

Hi @PRADEEPREDDY GU ,

You can glide on sys_trigger table.

Below is the example to insert a record

 

var gr = new GlideRecord("sys_trigger");

gr.initialize();

gr.short_description = 'test';
gr.name= 'Give some name';

gr.run_as = " dfgy"
gr.insert();

 

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Evaluator: com.glide.script.RhinoEcmaError: "inc" is not defined.
   script : Line(9) column(0)
      6: gr.name= 'Give some name';
      7: 
      8: gr.run_as = " dfgy"
==>   9: inc.insert();



error shown waht is inc

gr.insert(); // not inc.insert();

 

Will edit top reply.

 

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

This is just an example script 

You need to enter the column names which you want to enter in scheduled job

gr.name 

gr.run_as

gr.period

 

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.