I'm working with the suitecloud node cli and SDF f...
# general
n
I'm working with the suitecloud node cli and SDF for the first time. I have a new script and deployment defined that is going to replace two existing scripts that are not part of any SDF project. What is the best way to undeploy the old scripts automatically when I deploy the new SDF project? Is that possible through an XML object change?
j
Both options below, require me to import the old script record xml. Either update the existing script record with the new suitescript file path directory. Or import the old script records SDF and set their status through the xml.
Copy code
<scriptfile>[/SuiteScripts/{NewFile}.js]</scriptfile>
OR
Copy code
<status>NOT SCHEDULED</status>
TBH i'm still learning SDF. Not sure if there is anyway to do this automatically with the CLI. This is just how I would handle it
n
I'm curious if I can make the existing scriptIds external dependencies and just includ the scriptdeployment objects to change them to undeployed
The new script and old scripts are different types and I want the scripts themselves to remain intact, I just want to undeploy them so they no longer run when this new script runs
j
I see, yeah probably over my head. I'm wasting a lot of time with similar tasks, so I'm curious to see what options are out there. I'm starting to build in some automation, testing, etc. but nothing like this yet.
n
It looks like that worked
I had to specify the existing script files and scriptId objects within the original scripts, but did not have to include them in my SDF project
d
Hey @Nicholas Penree, I've added you to #C42JX79UZ 😄
n
Thanks, David!