Skip to content

Instantly share code, notes, and snippets.

@matrostik
Created June 19, 2018 19:30
Show Gist options
  • Save matrostik/3a3a28ee41aa6d012709a62cce9b3cca to your computer and use it in GitHub Desktop.
Save matrostik/3a3a28ee41aa6d012709a62cce9b3cca to your computer and use it in GitHub Desktop.
<script runat=server>
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var guid = Platform.Function.GUID();
var name = "my test de - " + guid;
var de = {
Name: name,
CustomerKey: guid,
Description: "Another DE added via SSJS",
Fields: [{
FieldType: "Text",
Name: "ID",
MaxLength: 36,
IsPrimaryKey: true,
IsNillable: false,
IsRequired: true
},
{
FieldType: "Text",
Name: "Name",
MaxLength: 200
}],
CategoryID: 1909
}
var res = prox.createItem("DataExtension", de);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment