Calling script Include from UI Script

pavan_yakkala
Kilo Contributor

Hello,

I have a requirement to call Script Include from UI Script as below

From UI Script : 1) Finding an event as load of List layout as below

        if(String(document.location).indexOf('core_company_list.do) > -1&& String(document.location).indexOf('sysparm_view=selectcompany') > -1){

}

If this condition is true,   i have to call a Script Include by passing a parameter to script Include where my script include validates with this parameter and decides the screen redirection based on validation.

Script Include :   It contains simple function which returns array of values based on validation of parameter passed.

I have to use this Script Include for list filter like javascript:scriptIncludeName();

This is for filtering list layout and redirection based on script return values as i have to pass a parameter on load.

can any one please help me.

Thanks,

Pavan.

5 REPLIES 5

instead of Global Business rule you can use script include. Just make sure that the name of script include is same as the function name that you are going to write. Make that script include client callable. You can call this as you mentioned above, no need of ajax call here.



Hope this will work for you.