- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 11:37 PM
Hi All,
Can any one explain how to call script include from business rule. please explain the differences between ondemand /classless , extend an exising class and define a new class.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 12:25 AM
Script Includes are ondemand reusable server side code.
Class based where you define something like this:
var NewInclude =Class.create(); NewInclude.prototype={ initialize :function(){}, myFunction :function(){//Put function code here}, type :'NewInclude'};
Call this in your BR as:
var foo =new NewInclude(); foo.myFunction();
Classless: is basically you create when your SI has only single function in case of mutplie functions in your SI you should define Class full.
For calling SI via client script you should use GlideAjax API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 12:25 AM
Script Includes are ondemand reusable server side code.
Class based where you define something like this:
var NewInclude =Class.create(); NewInclude.prototype={ initialize :function(){}, myFunction :function(){//Put function code here}, type :'NewInclude'};
Call this in your BR as:
var foo =new NewInclude(); foo.myFunction();
Classless: is basically you create when your SI has only single function in case of mutplie functions in your SI you should define Class full.
For calling SI via client script you should use GlideAjax API.