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.

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();