I created a SSJS script to delete certain records from a DE which seems to work fine for less than 2500 records. But once the number of records that need to be deleted surpass 2500 records, then it does not seem to work! I am guessing 2500 is the limit of the SSJS function DeleteData. Is there anyway we can overcome this 2500 limit if we need to delete more than 2500 records? My script for your reference is:
<script runat="server">
Platform.Load("core", "1.1.1");
try {
var deleteDE = DataExtension.Init("CABB6918-5DC2-4612-AC42-C10896F0F331");
var data = deleteDE.Rows.Retrieve();
for (var i=0; i < data.length; i++) {
var subKey = data[i].Email;
var perm = data[i].Permission;
var rowDelete2 = Platform.Function.DeleteData('Permissions',['EmailAddress','Permission'],[subKey,perm]); //deletes from Permissions DE
};
}
catch (ex) {
Write("An error has occurred: " + Stringify(ex));
Variable.SetValue("@Result", Stringify(ex)); //sets above ampscript variable
}
</script>
Thanks, Gaurav