Calling Script Include from Module Filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:10 AM
Hi All,
I am trying to call a script include from module filter using -
javascript:AZChangehelper.getCompanyID()
Script include is client callable and function is returning sys_id of some group. Is it mandatory to have same function name as script include or is there any other way to call script include from module filter.
tried these many options-
javascript:AZChangehelper.getCompanyID()
javascript:gs.inlcude('AZChangehelper'); new AZChangehelper.getCompanyID()
javascript:getCompanyID()
Nothing is working.
Thanks,
ARS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 09:03 AM
Hello Ashish,
I do have the same issue. I am in scoped application
Filter:
Script Include:
- function getSameAgencyUsersList()
- {
- var list=[];
- var gr=new GlideRecord('x_23191_e_c_c_traveler_profile');
- gr.query();
- while(gr.next())
- {
- list.push(gr.sys_id.toString());
- }
- gs.info('list returning '+list.toString());
- return list.toString();
- }
Error:
2016-09-14 11:54:43 | Warning | org.mozilla.javascript.EcmaError: "getSameAgencyUsersList" is not defined. Caused by error in <refname> at line 1 ==> 1: getSameAgencyUsersList() |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2017 05:34 AM
I know this is old, but in case someone else finds it. For a scoped app, add the scope to the call:
javascript:scope.function()