Forum Discussion

d19price's avatar
d19price
Occasional Contributor
9 days ago

Set active environment on Save

 

What is the correct way to always set the active environment to "Dev" upon saving a project?

Forgetting to do this creates a huge number of Git differences.

I tried with the below in my Project->Save Script and this works if the active environment is already set to "Dev", but fails with a bunch of errors if the active environment in the GUI is set to, for example, "Test" (the switch is actually made though to "Test").

project.environmentList.setActiveEnvironment("Dev")

 

 

 

1 Reply

  • d19price's avatar
    d19price
    Occasional Contributor

    *I tried with the below in my Project->Save Script and this works if the active environment is already set to "Dev", but fails with a bunch of errors if the active environment in the GUI is set to, for example, "Test" (the switch is actually made though to "Dev").