How to call script include from another script include. (2024)

Hello Priya,

1. You can call script include from another script include as below:

varosi = new otherScriptInclude();
osi.otherScriptIncludeFunction();

2. Way to call script include from Business rule, workflow activity or or from server side script:

varosi = new ScriptIncludeName();
osi.scriptIncludeFunction();

3. Way to call script include from client script, Catalog Client Script or UI policies

var deptName = g_form.getValue('department');
var si =new GlideAjax('ScriptIncludeName');
si.addParam('sysparm_name','scriptIncludeFunction'); // you need to usesysparm_namefor calling function
si.addParam('sysparm_dept',deptName); // you can add any parameter here in place ofsysparm_dept. like sys_dept
si.getXML(setDepartmentHead);

function setDepartmentHead(response){

var deptHead = response.responseXML.documentElement.getAttribute('answer');
g_form.setValue('u_department_head',deptHead);

}

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade
T-Systems

How to call script include from another script include. (2024)
Top Articles
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 6257

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.