How can we a call client script from another client script, any examples please?

micky09
Tera Contributor

How can we a call client script from another client script, Any examples please, any help would be appropriated.

8 REPLIES 8

This code is not working giving reference error as function not defined

 

Hello Micky , 

 

I dont think so client script can be called from another client script . Can you please tell me your exact requirement so that it would be helpful 

Let me tell you how it works as far as i know 

Client scripts are the ones which gets loaded as soon as the form loads for a particular table . Client Scripts loads along with the form  into the browser and based on the events that are happening during the form processing and manipulations on the form ,corresponding events trigger and respective functions execute like onload and on change 

But for making the functions code reusable we can have them defined in one client script and can be used in another script but the code which is defined in function onLoad() {} such kind of things cannot be called and need not as well because on triggering this event again the same function executes which is already defined 

 

Hope that helps

 

Thanks,

Siva 

@micky09 @Siva

 

i am not sure if you guys have tried to uncheck the check box "Isolate script" field on client script. refer the screenshot below.

 

find_real_file.png

 

Note: uncheck the check box on onload client script only.

then it will work. i tested on my PDI and it it working perfectly fine.

 

 

siva_
Giga Guru

What is your use case on that could you let us know that 

 

Thanks,

Siva