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
Chris Brady 8Chris Brady 8 

Can't Get StandardController to Recognize Leads

Hey yall,

I have a page below but am getting an error on line 1. I can't seem to get the standard.Controller to look a the leads object. 
I'm REALLY new to this so thanks to everyone who will help out a NOOB :)
<apex:page standardControler="Lead">
    </apex:form>

    <apex:pageBlock title="Discovery Questionnaire">
        <apex:pageBlockSection >
            <apex:pageBlockSection columns="1">
                What type of pharmacy are you?
                <apex:inputField value="{! Lead.Pharmacy_Type__c }"/>
                What products are you dispensing the most?
    <apex:inputField value="{! Lead.What_products_do_you_dispense_most__c }"/>  
                What doctors are yall networking with?
    <apex:inputField value="{! Lead.What_Doctors_do_you_Network_with__c }"/>
                What insurance do you see the most?
    <apex:inputField value="{! Lead.What_Insurance_do_you__c }"/> 
                How many scripts do yall fill in a month?
    <apex:inputField value="{! Lead.Number_of_Scripts_per_Month__c }"/>
                Are you familiar with Quasi Specialty Products? Such as Doxepin and Fenoprofen?
    <apex:inputField value="{! Lead.Dispenses_High_AWP_Products__c }"/>            
                Who are some of your other secondary wholesalers?
    <apex:inputField value="{! Lead.Secondary_Suppliers__c }"/> 
</apex:pageBlockSection>
        </apex:pageBlockSection>
        <apex:pageBlockButtons >
            <apex:commandButton action="{! save }" value="Save" />        
        </apex:pageBlockButtons>
    </apex:pageBlock>
    
    </apex:form>
</apex:page>

THansk 
Best Answer chosen by Chris Brady 8
Khan AnasKhan Anas (Salesforce Developers) 
Hi Chris,

Greetings to you!

There are few typos in your code like you need to use standardController instead of standardControler and you have closed the form tag instead of opening it. Please try below code:
<apex:page standardController="Lead">
    <apex:form>

    <apex:pageBlock title="Discovery Questionnaire">
        <apex:pageBlockSection >
            <apex:pageBlockSection columns="1">
                What type of pharmacy are you?
                <apex:inputField value="{! Lead.Pharmacy_Type__c }"/>
                What products are you dispensing the most?
    <apex:inputField value="{! Lead.What_products_do_you_dispense_most__c }"/>  
                What doctors are yall networking with?
    <apex:inputField value="{! Lead.What_Doctors_do_you_Network_with__c }"/>
                What insurance do you see the most?
    <apex:inputField value="{! Lead.What_Insurance_do_you__c }"/> 
                How many scripts do yall fill in a month?
    <apex:inputField value="{! Lead.Number_of_Scripts_per_Month__c }"/>
                Are you familiar with Quasi Specialty Products? Such as Doxepin and Fenoprofen?
    <apex:inputField value="{! Lead.Dispenses_High_AWP_Products__c }"/>            
                Who are some of your other secondary wholesalers?
    <apex:inputField value="{! Lead.Secondary_Suppliers__c }"/> 
</apex:pageBlockSection>
        </apex:pageBlockSection>
        <apex:pageBlockButtons >
            <apex:commandButton action="{! save }" value="Save" />        
        </apex:pageBlockButtons>
    </apex:pageBlock>
    
    </apex:form>
</apex:page>

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Chris,

Greetings to you!

There are few typos in your code like you need to use standardController instead of standardControler and you have closed the form tag instead of opening it. Please try below code:
<apex:page standardController="Lead">
    <apex:form>

    <apex:pageBlock title="Discovery Questionnaire">
        <apex:pageBlockSection >
            <apex:pageBlockSection columns="1">
                What type of pharmacy are you?
                <apex:inputField value="{! Lead.Pharmacy_Type__c }"/>
                What products are you dispensing the most?
    <apex:inputField value="{! Lead.What_products_do_you_dispense_most__c }"/>  
                What doctors are yall networking with?
    <apex:inputField value="{! Lead.What_Doctors_do_you_Network_with__c }"/>
                What insurance do you see the most?
    <apex:inputField value="{! Lead.What_Insurance_do_you__c }"/> 
                How many scripts do yall fill in a month?
    <apex:inputField value="{! Lead.Number_of_Scripts_per_Month__c }"/>
                Are you familiar with Quasi Specialty Products? Such as Doxepin and Fenoprofen?
    <apex:inputField value="{! Lead.Dispenses_High_AWP_Products__c }"/>            
                Who are some of your other secondary wholesalers?
    <apex:inputField value="{! Lead.Secondary_Suppliers__c }"/> 
</apex:pageBlockSection>
        </apex:pageBlockSection>
        <apex:pageBlockButtons >
            <apex:commandButton action="{! save }" value="Save" />        
        </apex:pageBlockButtons>
    </apex:pageBlock>
    
    </apex:form>
</apex:page>

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Chris Brady 8Chris Brady 8
Thanks Khan! You're the BEST!