GlideAjax: can we still do "initialize" variables?

tahnalos
Kilo Sage

So I realize that using an initialize function on a GlideAjax is a bad thing to do.

On regular script includes, I use the initialize function to declare certain variables that will be used by the class.  Is there any way to do this on a GlideAjax script include if the initialize function cannot be used?

Thanks 

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

Additional example in this article here: https://community.servicenow.com/community?id=community_article&sys_id=1f0f6af11be7cd14c552c8031d4bc...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

That's a good post.  Thanks fro sharing!

I've marked this as the correct answer as it takes into account scoped applications.

I feel like im missing something.  Whats different from a scoped perspective for this?  I'm just curious and I'm not seeing a difference.  Thanks!