can we call scriptinclude inside script include and
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2018 09:45 PM
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2018 09:59 PM
Hi Avinash,
Yes. You can call a script include inside a script include using the same syntax you use when you call a script include in business rule.
For ex.
var myscript = new ScriptIncludeName();
myscript.functionname(parm1,parm2);
Please mark this response as correct or helpful if it assisted you with your question.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2018 10:41 PM
Hi Avinash,
Yes. We can call the script include inside other script include.
Check it out following example,
1. SuperScript Include
Code:
var SuperScriptInclude = Class.create();
SuperScriptInclude.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize:function(){
},
parent :function(){
var scObj = new global.ChildSciptInclude();
return "Parent Script Include ->"+ scObj.child();
},
type: 'SuperScriptInclude'
});
2. ChildScript Inclide
Code:
var ChildSciptInclude = Class.create();
ChildSciptInclude.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize:function(){
},
child:function(){
return "ChildSciptInclude";
},
type: 'ChildSciptInclude'
});
Tested with background scripts.
Code:
var scObj = new global.SuperScriptInclude();
gs.print(scObj.parent());
Output of background script is,