Skip to content

Instantly share code, notes, and snippets.

@angrycider
Created March 27, 2017 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angrycider/cef64f6d5081bad90625747bb622386e to your computer and use it in GitHub Desktop.
Save angrycider/cef64f6d5081bad90625747bb622386e to your computer and use it in GitHub Desktop.
8. Retrieve Folder with Given Parent
//Retrieve Folder within folder
var parentFolderID = '99624'; //Hover over or inspect the folder in the UI and look at the CID querystring variable
var options = {
filter: {
leftOperand: 'ParentFolder.ID',
operator: 'equals',
rightOperand: parentFolderID
}
};
SoapClient.retrieve(
'DataFolder',
["ID", "Name", "ParentFolder.ObjectID", "ObjectID"],
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