Search code examples
tridiontridion-2011

List of Publication Targets using Tridion Core Service?


How would I get a list of Publication Targets with the Tridion Core Service? I see this code sample to get the Target Info, but cannot find a way to get the list from the Core Service. Maybe it is part of the Publication object?

var pubtarget = (PublicationTargetData)client.Read("tcm:0-21-65537", readoption);

Also, if there is a way to get this via the Anguilla JavaScript client it would also be cool.


Solution

  • var filter = new PublicationTargetsFilterData();
    var pubTargets = ClientAdmin.GetSystemWideList(filter);
    var pubTargetsXml = ClientAdmin.GetSystemWideListXml(filter);
    

    You can set additional filter properties on filter object