I am writing to know how can I do several actions on a Data Extension and Create Folder using Javascript by SSJS
Currently I can not create a folder. I do not understand what is the problem . By the way the only tool in Marketing Cloud that tells me if the script is successful is the "Automation" that I created specifically which tells me if the script is "Completed" or gives "Error".
Definitely something wrong in the JavaScript code. However I ask you to assist me at least to create a sub-folder under the folder "Data Extensions". Can you tell me if this code is correct or not?
<script runat=server>
Platform.Load("core","1");
var myDE = Folder.Retrieve({Property:"Name",SimpleOperator:"equals",Value:"Data Extensions"});
myDE.SetID(12345);
var newFolder = {
"Name" : "Folder Script",
"CustomerKey" : "test_folder_key",
"Description" : "Test added",
"ContentType" : "dataextension",
"IsActive" : "true",
"IsEditable" : "true",
"AllowChildren" : "false",
"ParentFolderID" : 12345
};
var status = myDE.Add(newFolder);
</script>
Regards Riccardo Pruner