# JS Execution file not working for multiple device

**URL:** <https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591>\
**Category:** Studio Pro\
**Created:** [November 13, 2023, 12:52pm UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591 "2023-11-13T12:52:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayank\_Sharma](https://forum.electroneek.com/user_avatar/forum.electroneek.com/mayank_sharma/32/1523_2.png) [@Mayank\_Sharma](https://forum.electroneek.com/u/Mayank_Sharma)\
**Post date:** [November 13, 2023, 12:52pm UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/1 "2023-11-13T12:52:08Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Muhammad\_Hayyan](https://forum.electroneek.com/user_avatar/forum.electroneek.com/muhammad_hayyan/32/1746_2.png) [@Muhammad\_Hayyan](https://forum.electroneek.com/u/Muhammad_Hayyan)\
**Post date:** [November 14, 2023, 5:38am UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/2 "2023-11-14T05:38:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mayank\_Sharma](https://forum.electroneek.com/user_avatar/forum.electroneek.com/mayank_sharma/32/1523_2.png) [@Mayank\_Sharma](https://forum.electroneek.com/u/Mayank_Sharma)\
**Post date:** [November 15, 2023, 5:34am UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/3 "2023-11-15T05:34:50Z")

</div>

Hi @Muhammad_Hayyan, Thanks for the suggestion but **Execute JS Code** also save file locally it was mentioned here [Others](https://docs.electroneek.com/docs/others#execute-js-code).

 ![image](https://forum.electroneek.com/uploads/default/original/2X/9/9099ba7be408a94c3ce9c6b0ad653165c552b6f3.png)

---

<div class="post-metadata">

**Author:** ![m4gnate](https://forum.electroneek.com/user_avatar/forum.electroneek.com/m4gnate/32/1752_2.png) [@m4gnate](https://forum.electroneek.com/u/m4gnate)\
**Post date:** [November 20, 2023, 3:47pm UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/4 "2023-11-20T15:47:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Muhammad\_Hayyan](https://forum.electroneek.com/user_avatar/forum.electroneek.com/muhammad_hayyan/32/1746_2.png) [@Muhammad\_Hayyan](https://forum.electroneek.com/u/Muhammad_Hayyan)\
**Post date:** [November 22, 2023, 8:49am UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/5 "2023-11-22T08:49:27Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Muhammad\_Hayyan](https://forum.electroneek.com/user_avatar/forum.electroneek.com/muhammad_hayyan/32/1746_2.png) [@Muhammad\_Hayyan](https://forum.electroneek.com/u/Muhammad_Hayyan)\
**Post date:** [November 22, 2023, 8:53am UTC](https://forum.electroneek.com/t/js-execution-file-not-working-for-multiple-device/3591/6 "2023-11-22T08:53:17Z")

</div>

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.
