1

I am using TOM APIs and trying to save list of categories and keywords as a single list. I am using

 Publication pub = tdse.GetPublication(publicationUri);
            ListRowFilter rowFilter = tdse.CreateListRowFilter();
            rowFilter.SetCondition("ItemType", ItemType.ItemTypeCategory | ItemType.ItemTypeKeyword);
            rowFilter.SetCondition("Recursive", true);

            catandkeyList.LoadXml(pub.GetListItems(ListColumnFilter.XMLListDefault, rowFilter));
            catandkeyList.Save(Server.MapPath("Keyworddetails.xml"));

But only list of categories are getting saved as a result. Can some one suggest if there is any other way to setCondition for Row filter for both Categories and keywords?

 rowFilter.SetCondition("ItemType", ItemType.ItemTypeCategory | ItemType.ItemTypeKeyword);

I only have publication ID as input parameter.

  • You may have to get Categories and then Keywords. The R5.3 (TOM) documentation also explains CreateListRowFilter() is "for backward compatibility only. New code should use GetObject or GetNewObject instead." Would GetListKeywords() work for you? – Alvin Reyes Aug 27 '14 at 17:53
  • I agree with Alvin and think you may have to first define and save the category and then add the keywords. – robrtc Aug 28 '14 at 9:04
  • Thanks Alvin and Robert for your suggestion. I will try this. – Manish Mehmood Sep 5 '14 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.