0

I am new to salesforce platform i am solving Trailhead salesforce.i got struck in Visualforce basics. ssuggest me to solve this error

REF:https://trailhead.salesforce.com/visualforce_fundamentals/visualforce_forms

TRAILHEAD ERROR:Challenge Not yet complete... here's what's wrong: The page component does not include the Contact Standard Controller.

ERROR IN DEVELOPER VISUALFORCE CONSOLE: Contacts does not exist

CODE I HAD WRITTEN :

<apex:page standardController="Contacts">
    <apex:form>
        <apex:inputField value="{! Contact.First Name}"/>
        <apex:inputField  value="{! Contact.Last Name}"/>
        <apex:inputField  value = "{! Contact.Email}"/>
        <apex:commandButton action="{! save}" value="save"/>
    </apex:form>    
</apex:page>

Thanks and Regards sainath

1 Answer 1

2

Contacts is the Plural of the Contact object and is used in relationships between standard objects and Contact (i.e. Account.Contacts)

Change your code to use the correct API Name of the object Contact

<apex:page standardController="Contact">
    <apex:form>
        <apex:inputField value="{!Contact.FirstName}"/>
        <apex:inputField  value="{!Contact.LastName}"/>
        <apex:inputField  value = "{!Contact.Email}"/>
        <apex:commandButton action="{!save}" value="save"/>
    </apex:form>    
</apex:page>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .