Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Adding initialize script include is not callable from client

thisisauniqueus
Giga Expert

Hi

I have a script include like

var Util = Class.create();

Util.prototype = Object.extendsObject(AbstractAjaxProcessor, {

     

ExampleFunc: function(curr) {

  }

.....

i wanted to call it from server side as well as from client so initialized it like

var Util = Class.create();

Util.prototype = Object.extendsObject(AbstractAjaxProcessor, {

initialize: function() {   },

ExampleFunc: function(curr) {

  }

.....

but when i add initialize: function() {   },   i am unable to call the function from the client script and if i remove it its not callable form server

pl help!

Regards

6 REPLIES 6

Rajyalakshmi
Mega Guru

Use  _init() to call script include from client side.

_init:function(){

 

}

please refer Julian Hoch workaround ,it worked .

_init:function(){

}

_init();