Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Last active November 15, 2019 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/fc851953df24090832ca26a075316afc to your computer and use it in GitHub Desktop.
Save zuzannamj/fc851953df24090832ca26a075316afc to your computer and use it in GitHub Desktop.
<script runat="server">
Platform.Load("core","1.1.5");
try{
var prox = new Script.Util.WSProxy();
var CustomerKey = "xxxxx-xxxx-xxxx-xxxx", //Insert DE External Key
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.
var res = prox.updateItem("DataExtension", {"CustomerKey":CustomerKey, "IsSendable":IsSendable, "SendableDataExtensionField":SendableDataExtensionField, "SendableSubscriberField":SendableSubscriberField});
Write(Stringify(res));
}catch(e){
Write(Stringify(e));
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment