Skip to content

Instantly share code, notes, and snippets.

View jdeblank's full-sized avatar

Josh de Blank jdeblank

  • Melbourne, Australia
View GitHub Profile
<script runat="server">
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var queryAllAccounts = true;
var cols = ["Client.ID","CustomerKey","ListName","ID"];
var filter = {
Property: "ListClassification",
SimpleOperator: "equals",
Value: "PublicationList"
<script runat="server">
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var action = "ClearData";
var props = {
CustomerKey: 'testDE123'
};
var opts = {};
var data = prox.performItem("DataExtension", props, action, opts);
<script runat="server">
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var options = {SaveOptions: [{'PropertyName': '*', SaveAction: 'UpdateAdd'}]};
var email = 'test@email.com';
var subscriberkey = 'yourkey';
function unsub(mid, listid) {
prox.setClientId({ "ID": mid }); //This will switch BU contexts
var props = {
<script runat="server">
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var de = {
CustomerKey: 'AA554FF4-B0FF-4F1E-ADA9-123123123',
Name: 'NewName'
};
var resp = prox.updateItem("DataExtension", de);
Write("<br>Response: " + resp.Results[0].StatusMessage);
</script>

Keybase proof

I hereby claim:

  • I am jdeblank on github.
  • I am jdeblank (https://keybase.io/jdeblank) on keybase.
  • I have a public key ASChluyyJ1zSPCm0RuQvN9LVAr-a2jvz6VKY5kXLNxXsoAo

To claim this, I am signing this object: