Bryan Miller
08/15/2023, 5:08 PMWatz
08/15/2023, 9:03 PMrequire(['N/search'], function(search) {
try {
var s=search.create({
type: "scriptdeployment",
filters: [ ["status","anyof","SCHEDULED"] ]
});
const ids = []
s.run().each(function(r){
ids.push(r.id)
return true;
});
console.log(ids)
} catch(e){console.error(e.message);}})
3. This will output a list of ids for Script deployments that are scheduled. Copy this list.
4. Log in to the sandbox environment and navigate to any record-page
5. Run this code in the console:
require(['N/record'], function(record) {
[paste,the,comma,separated,list,of,ids,from,step,4,between,the,brackets].forEach(id => {
const rec = record.load({ type: record.Type.SCRIPT_DEPLOYMENT, id })
rec.setValue({fieldId: 'status', value: 'SCHEDULED'})
rec.save()
})
})
6. Verify that you now have an equal number of scripts that are scheduled in the sandbox as in productionBryan Miller
08/15/2023, 9:05 PMWatz
08/15/2023, 9:08 PMerictgrubaugh
08/16/2023, 5:45 PMBryan Miller
08/17/2023, 9:56 PMWatz
08/25/2023, 8:06 PMBryan Miller
10/05/2023, 5:23 PM