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.

3
  • 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? Commented Aug 27, 2014 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
    Commented Aug 28, 2014 at 9:04
  • Thanks Alvin and Robert for your suggestion. I will try this. Commented Sep 5, 2014 at 12:34

0

Your Answer

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

Browse other questions tagged or ask your own question.