+ Start a Discussion

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?