Lazy mans WSProxy retrieve all

var prox = new Script.Util.WSProxy(); 
var cols = ["Name", "CustomerKey", "CategoryID", "IsSendable"];
var data = prox.retrieve("DataExtension", cols);

Describe

var soapObject = "DataExtension";
var describe = prox.describe(soapObject);
var colsArr = [];
for (var i=0; i<describe.Results[0].Properties.length; i++) {
if (describe.Results[0].Properties[i].IsRetrievable) {
colsArr.push(describe.Results[0].Properties[i].Name);
};
};

Retrieve

var deName = "Onboarding Journey";
var filter = {"Property": "Name", "SimpleOperator": "equals", "Value": deName};
var data = prox.retrieve(soapObject, colsArr, filter);
Write(Stringify(data));

--

--

--

I am a certified Salesforce Marketing Cloud Consultant at Bower House Digital in Melbourne, Australia.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploy Nginx and docker to CentOS 8 VM on azure

Best Black Friday 2021 Deals for Designers and Developers

#24 Swap Nodes in Pairs

Python for programmers

How to Choose a Software Outsourcing Partner?

How you can avoid bugs upfront

How to use UUID in Laravel for primary keys?

user Migration with uuid

My small experiment at Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Charlie Fay

Charlie Fay

I am a certified Salesforce Marketing Cloud Consultant at Bower House Digital in Melbourne, Australia.

More from Medium

Crop images using LWC and External JS library !

OmniStudio Architecture

How to retrieve custom metadata records based on recordId without Apex SOQL uses of ‘uiRecordApi’…

Salesforce Platform Events — The Full Guide