+ Start a Discussion
michelle emanuel 59michelle emanuel 59 

using apex in components

Cannot use "Controller" in apex class name.

Trailhead requests that the apex class name be DisplayCaseController but componet cannot be saved when "Controller" is in class name. If I shorten the name to DisplayCaseCont it will save but not as DisplayCaseController. However the trailhead check required the name to be DisplayCaseController to pass.
<aura:component controller="DisplayCaseController" >
    <aura:attribute name="record" type="Case"/>
    <p>{!v.record.Subject}</p>
    <p>{!v.record.Description}</p>
    <p>{!v.record.Status}</p>
</aura:component>

 
Martijn SchwarzerMartijn Schwarzer
Hi Michelle,

I always use "Controller" in apex class names (for controllers), so that should work. 

Do you by any chance already have a class called DisplayCaseController in your org? Maybe you just need to adjust that class to meet the Trailhead requirements.

The only other explanation I see is that there is something wrong in your org. Either contact support to have it fixed, or just sign up for a new Deve Org for this Trailhed challenge.

Good luck and happy coding!

Best regards,
Martijn Schwärzer