I need to get child publications of a publication. I am using the following approach: get "where used" for the publication. Until now my code looks like this:
var id = publicationParent5TcmId;
var filter = new Tridion.ContentManager.ListFilter({columns: const.ColumnFilter.DEFAULT |$const.ColumnFilter.ALLOWED_ACTIONS | $const.ColumnFilter.VERSIONS, conditions:{InclLocalCopies: true}});
var brothersPublications;
var onSuccess = function () {
if (brothersPublications) {
$log.debug("WhereUsed.GetListUsingItems success: found " + brothersPublications.length + " brothers publications");
}
else {
$log.debug("WhereUsed.GetListUsingItems success");
}
};
var onFailed = function () {
$log.debug("WhereUsed.GetListUsingItems failed");
};
brothersPublications = tridion.Web.UI.ContentManager.WhereUsed.GetListUsingItems(id, filter.conditions, filter.columns, onSuccess, onFailed);
It enters in onSuccess function, but brothersPublications is undefined.