Last active
November 15, 2019 19:19
-
-
Save zuzannamj/ab6d4ee38a69cf7f51b6bbb4ad0cd02b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("core","1.1.5"); | |
try{ | |
var prox = new Script.Util.WSProxy(); | |
var CustomerKey = []; //Create an array withh DE External Keys | |
var IsSendable = "true", | |
SendableDataExtensionField = {"Name": "email", "DataType": "EmailAddress"}, //Provide the name of the field used to establish a data relationship (SendableDataExtensionField relates to subscribers on SendableSubscriberField) | |
SendableSubscriberField = {"Name": "Subscriber Key"}; //Use "Subscriber Key" or "Email Address" depending on whether the SUBSCRIBER_KEY business rule has been turned on. | |
for(var i=0; i< CustomerKey.length; i++) { | |
var res = prox.updateItem("DataExtension", {"CustomerKey":CustomerKey[i], "IsSendable":IsSendable, "SendableDataExtensionField":SendableDataExtensionField, "SendableSubscriberField":SendableSubscriberField}); | |
Write(Stringify(res) + "<br>"); | |
} | |
}catch(e){ | |
Write(Stringify(e)); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment