logo

NJP

Writing script include, how to use and more... / Como construir, como utilizar?

Import · Nov 13, 2018 · article

How to do a new script inclcude.

01. Navigate to

>> System UI > Script Include

image

02. New

image

03. Type vaules

image

04.After typing name, it'll be created the standard script

image

Samples:

A. By Chuck Tomasi.

var foo = Class.create();

foo.prototype = {

       initialize: function() {

       },

   bar : function() {
   this.zip(5);

   },


   zip : function(num) {

   gs.info('num=' + num);

   }
       type: 'foo'
};

B. How to call "Script include" / Referring, Chamando .

var objFoo = new foo();
objFoo.zip(123);

C. referring inside, Chamando .

this.zip(5);

image

Update set Planejando e executando mudanças no ambiente.

View original source

https://www.servicenow.com/community/itsm-articles/writing-script-include-how-to-use-and-more-como-construir-como/ta-p/2317019