In suitescript, I'm downloading files from sftp se...
# suitescript
b
In suitescript, I'm downloading files from sftp server. But to avoid downloading same files again, I'm trying to set parameter. But the issue is in summary stage, when I tried to save parameter using this code, it throws me Unexpected error.
Copy code
let script_deployment = record.load({type: record.Type.SCRIPT_DEPLOYMENT, id: "customdeploy_deployment_id"});
                script_deployment.setValue({fieldId: 'custscript_param', value: files});
                script_deployment.save();
I'm assuming this might due to it's still open so I tried to do that by running new Scheduled script to save it but it didn't work neither Could anyone help me on this please?
b
b
@battk yes but I can't edit that deployment inside that script while it's running?
I tried to do that in Summarize stage to create a new task to execute Scheduled Script and it didnt work
b
compare your attempt to the attempt in the example
b
Thank you deploymentId should be number, not the text