Using SOQL statement, I want to query the Data Categories tree structure that I have created on Saleforce. How can I do this?

  • if you add more details about the information you have, or your code, i can give you a more meaningful answer. – PartOfTheOhana May 26 '19 at 16:50

Knowledge Article Version can have multiple DataCategories. For reference, is the data model. You'll see DataCatagories as Article__DataCategorySelection

As to how do you get the Article__DataCategorySelection? I'm not clear where you're starting from, but the query below is a place to start. Salesforce give you some instructions on working with Data Categories and SOQL

 SELECT Id, Title
    FROM DataCategorySelections
FROM Offer__kav WHERE publishStatus='online';

PS- Something I learned the hard way, you can't use triggers on Article Types, and you need to use formulas instead.

enter image description here

| improve this answer | |

Your Answer

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

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