JS Execution file not working for multiple device

I am encountering an issue while executing a JavaScript file from a different device. I have created a flow that includes the execution of a JS file and uploaded it to Orchestrator SaaS along with the JS file.

Now, here is the problem that I am facing:

Device 1, which has the JS file locally and needs to execute it. When clicking a button from a CRM and using the bot runner, it works and executes the file because it is locally available.

However, when attempting the same process from another device, Device 2, and hitting the same button in the CRM, the JS execution does not work.

So, is there any way to access that JS file that I have uploaded to Orchestrator SaaS from Device 2? Please let me know.

Thanks!

Hello!

Have you tried using Execute JS Code activity instead of using Execute JavaScript. If not, give it a try It might work for you.

Hi @Muhammad_Hayyan, Thanks for the suggestion but Execute JS Code also save file locally it was mentioned here Others.

1 Like

@Muhammad_Hayyan is your js file located in the project folder?

@Mayank_Sharma Yup! That’s correct. But still I would suggest to give it a try for once. Maybe it work for you.

Secondly you can use your JavaScript functions in your variables as well. You can try this, it might solve your issue. I use JavaScript functions in variables most of the time.

Hello @m4gnate

Yes! It’s default location is inside the project folder → execute_js_code_scripts. Although you can place it anywhere on your PC and run it, just give your activity the location of this file.