I'm trying to retrieve the CustomObjectID of a data extension that already exists, by using the External Key/CustomerKey. That didn't work, so now I'm trying to retrieve any DEs at all, and that's not working either. Here is my code, I'm running it in a Landing page:
<script runat="server">
Platform.Load("Core","1");
var clientID = Attribute.GetValue('memberid');
var api = new Script.Util.WSProxy();
api.setClientId({"ID": clientID});
var cols = [ "Name", "CustomerKey", "CategoryID", "IsSendable"];
var res = api.retrieve("DataExtension",cols);
Write(res);
</script>
I don't get a JSON object back. What is written out is:
System.Collections.Generic.Dictionary`2[System.String, System.Object]
I don't know what this means, except that there are no data extension objects to return? I'm literally following the exact example in the documentation:-
I can't even get the describe function to work:
var res = api.describe("DataExtension");
returns the same result -
System.Collections.Generic.Dictionary`2[System.String,System.Object]
To add to the confusion, I can use describe and retrieve QueryDefinition objects and emailSendDefinition objects just fine - no issue there.