Skip to main content
Content Starts Here Search Solutions

Solution Detail

 
Solution TitleWhy is my script not updated after an edit?
Solution Number00000818
Solution Details

Background

When using a Script Element in Switch, it's possible to do an 'Edit script package' by right-clicking the Script element and choosing this option. After updating the script package and saving the script, the edited script can be loaded in your flow by, again, right-clicking the Script element and choosing 'Reload Script Package'. 

This should reload the newly edited script, and upon relaunching the flow, it will now be using the new script in the flow.

Symptoms

After an edit to a script, saving it, and reloading it in the flow, the flow is still using an older version of the script, instead of the updated version.

Solution

  • Make sure that the script was in fact saved after the edit.
  • Reload the script element by right-clicking the Script element and 'Reload Script Package.
  • If the above actions have been verified but the issue remains, it's likely that the script is also in use in a different, activated flow.
In this last case, if a script is in use on multiple flows, the updated version can not be loaded as long as it's still active in an activated flow. It will then use the previous script version which is still in memory and will log an error message in the Switch Messages (but the flow will start).
To use the updated version of the script, all flows using the script need to be stopped and made sure none is running, before they are re-activated again. If you first activate one flow, and only then stop and start the second flow, it will log the same error in your messages and will not use the updated script yet.


Error message in Switch Messages:


 
Does this solution help you answer your question?