1

I have a delete request coded using the SOAP API and the response back is:

AutomationDelete:["Delete Access is denied!", 0]"Error"

Is the action truly denied or am I not writing the code properly? Here is the API code:

var Automation = Platform.Function.CreateObject("Automation");
Platform.Function.SetObjectProperty(Automation, "CustomerKey", "MyAutomation");

var StatusAndRequestID = [0,0];
var DeleteResults = Platform.Function.InvokeDelete(Automation, StatusAndRequestID, null);
  • Did you found a solution? – Bidstrup Oct 7 '16 at 12:12
0

I found that it does work, but NOT from a CloudPage (this triggers "Delete Access is Denied!"). Only from within an SSJS Script activity. Here is the WSProxy version of the code.

I used the Object ID which you have to retrieve in advance. See here: https://sprignaturemoves.com/retrieving-and-starting-an-automation-with-ssjs/

Not sure if this works with the Customerkey.

var automationToDelete = "OBJECT ID OF AN AUTOMATION"; 
var prox = new Script.Util.WSProxy();
    try {
       var res = prox.deleteItem("Automation", { "ObjectID": automationToDelete
});
   } catch (e) {
    //error processing
   }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.