Using SOQL statement, I want to query the Data Categories tree structure that I have created on Saleforce. How can I do this?
Knowledge Article Version can have multiple DataCategories. For reference, is the data model. You'll see DataCatagories as
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 ( SELECT Id 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.