I recently stumbled across the WSProxy which seems to be interesting particularly as they seem to be more convenient to use than traditional soap calls and reduce performance overhead.
I am trying it out, but can seem to get it to work.
I am running the sample code as a script activity in Automation Studio and here is my code:
<script runat=server>
Platform.Load("core","1");
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: 101377
}
var res = prox.createItem("DataExtension", de);
</script>
The script runs, but the DE is not created. I would appreciate any pointers on this.