7

I want to get the list of all publications in Tridion CMS using core service. Couldn't fetch the publications Information using PublicationData Class or PublicationFilterData class.

1
  • Perhaps share the code that you have tried so others can comment on where you have gone astray? Simply requesting code without any explanation of what you've tried (and why) isn't going to help others so much either. Jul 3, 2013 at 6:36

1 Answer 1

6

Try this code:

public XmlDocument GetPublicationList()
{
    XmlDocument publicationList = new XmlDocument();
    using (var client = GetCoreServiceClient())
    {
        PublicationsFilterData filter = new PublicationsFilterData();
        XElement publications = client.GetSystemWideListXml(filter);
        publicationList.Load(publications.CreateReader());
    }
    return publicationList;
}

This fetches a list of all Publications (available to the logged in user).

If that does not work for you, please share your effort and error (or result) that you are getting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.