1

I have a sendable DE which i am trying to truncate . however its erroring out.

The code for ssjs is

<script runat="server">
     Platform.Load("core", "1.1.1");
     var rows = Platform.Function.DeleteData("863A1A7D-B737-4B53-81E3-6F49BCC3EE27","Type","1");

Also I tried another approach , Added a Type column to DE which is predefaulted to 1 of type text and then used following code to delete rows , this is also failing .

<script runat="server">
Platform.Load("core", "1.1");
var Cus_NL_DE = DataExtension.Init("Consumer Newsletter NL - Staging");
var row = Cus_NL_DE.Rows.Remove("Type","1");

I am testing by putting the script in automation and running ,

2

finally got this working ,.

var rows = Platform.Function.DeleteDE("Consumer Newsletter NL - Staging",['DeleteType'],['1']);

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.