function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TBouscalTBouscal 

How to access KnowledgeArticle.ArticleNumber in Case query

Have a requirement to post the first article number selected for a Case to a field on the Case.

I have a query that works but I can't access the article number to put into a map with the CaseID.
 
myCase=[SELECT CaseId, knowledgearticle.articlenumber 
FROM CaseArticle 
WHERE CaseId in :cs LIMIT 1]; 
        // query works in dev console

        For(CaseArticle eca:myCase){
            CaseArticleMap.put(eca.CaseId, eca.knowledgearticle.articlenumber); 
        }  // error: Variable does not exist: articlenumber

Any suggestions?