How to call script include in both Client Script and BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2018 01:09 AM
Hi I want to call one Script Include in Both Client Script and Business Rule (I have Checked the Client Callable Check box in Script Include)
Script Include:
var getGroupName = Class.create();
getGroupName.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getDetails: function(){
var asgment = [];
var priority = [];
var rest = this.getParameter('sysparm_ServiceReqType');
var comp = this.getParameter('sysparm_company');
var grp = new GlideRecord('x_mapping_table');
grp.addQuery('request', rest);
var cmp = grp.addQuery('company',comp);
cmp.addOrCondition('company',"");
var order = grp.orderByDesc('company');
order.addOrCondition('request');
grp.query();
if(grp.next()){
var myAnswer = {
"assignment_group" : grp.getValue('assignment_group'),
"priority" : grp.getValue('priority')
};
var result = JSON.stringify(myAnswer);
return result;
}
},
type: 'getGroupName'
});
Calling Script Include in BR:
I have written this below code in BR for calling the Script include but its showing error
var gn = new getGroupName();
gs.info("Call Script include" + gn.getDetails());
- Labels:
-
Best Practices
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 08:01 AM
You cant, you can only use client script script include for client script. ajax cant be used for server.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2020 06:39 AM
na na na .....................
goriya chura na mera Jiya.....................
do like share and subscribe............................
Thanks in Advance
Peshwa Bajirao Ballad...............