Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@angrycider
Created March 27, 2017 22:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angrycider/47a2727e274ef87632c115b333aeb473 to your computer and use it in GitHub Desktop.
Save angrycider/47a2727e274ef87632c115b333aeb473 to your computer and use it in GitHub Desktop.
12. Retrieve Data Extension Object ID given a Customer Key
//Retrieve Data Extension ObjectId
var options = {
filter: {
leftOperand: 'CustomerKey',
operator: 'equals',
rightOperand: 'IonThreeTesting'
}
};
SoapClient.retrieve(
'DataExtension',
["ObjectID", "CustomerKey", "Name"],
options,
function( err, response ) {
if ( err ) {
// error here
console.log( err);
return;
}
// response.body === parsed soap response (JSON)
// response.res === full response from request client
console.log( response.body );
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment