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
Surender reddy SalukutiSurender reddy Salukuti 

standardController

<apex:page standardController="Loan" >
    <apex:sectionHeader title="Loan" subtitle="Loan details"/>
    <apex:form>
    <apex:pageBlock title="Loan Edit">
       <apex:pageBlockButtons location="top">
           <apex:commandButton value="Save"/>
           <apex:commandButton value="cancel"/>
           <apex:commandButton value="save&New"/>
        </apex:pageBlockButtons>
        <apex:pageBlockSection>
        <apex:inputField value="{!Loan__c.Loan_Type__c}" />
            <apex:inputField value="{!Loan__c.payment__c}"/>
            <apex:inputField value="{!Loan__c.Payment_date__c}"/>    
        </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
</apex:page>

When i run this program its showing error
errorMessage-Loan does not exisit
Best Answer chosen by Surender reddy Salukuti
SandhyaSandhya (Salesforce Developers) 
Hi,

Replace with above line
 
<apex:page standardController="Loan__c" >

   Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
 
 
 

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

Replace with above line
 
<apex:page standardController="Loan__c" >

   Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
 
 
 
This was selected as the best answer
Surender reddy SalukutiSurender reddy Salukuti
Hi, Thanks it's working
SandhyaSandhya (Salesforce Developers) 
Please mark it as solved by choosing BestAnswer so that it will make it available for other as the proper solution.
Surender reddy SalukutiSurender reddy Salukuti
<apex:page standardController="Customer__c">
    <apex:sectionHeader title="Customer" subtitle="New customer"/>
    <apex:form>
    <apex:pageBlock title="New Account">
        <apex:pageBlockButtons location="top">
        <apex:commandButton value="save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!Cancel}"/>
            <apex:commandButton value="save&New" action="{!quicksave}"/>
        </apex:pageBlockButtons>
        <apex:pageBlockSection>
      
            <apex:inputField value="{!Customer__c.Owner}"/>
            <apex:inputField value="{!Customer__c.First_Name__c}"/>
            <apex:inputField value="{!Customer__c.    city__c}"/>
            <apex:inputField value="{!Customer__c.Branch_c}"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
        
    </apex:form>
</apex:page>

When i running this program its showing error
Error-Syntax error.  Found 'Customer__c.'
NagendraNagendra (Salesforce Developers) 
Hi Surender,

I can see two errors in your code.
  1. There are a couple of spaces when you are referring city field from the customer object( <apex:inputField value="{!Customer__c.    city__c}"/>).Try removing those spaces.
  2. When you are referring branch custom field from the customer object it is missing double underscore in it(<apex:inputField value="{!Customer__c.Branch_c}"/>).Please ensure that the field has double underscore C(__C) when you refer a custom field.
  3. After fixing the above two issues your code works absolutely fine.
Please try below code which works fine for me.
<apex:page standardController="Customer__c">
    <apex:sectionHeader title="Customer" subtitle="New customer"/>
          <apex:form>
          <apex:pageBlock title="New Account">
          <apex:pageBlockButtons location="top">
   <apex:commandButton value="save" action="{!save}"/>
   <apex:commandButton value="Cancel" action="{!Cancel}"/>
   <apex:commandButton value="save&New" action="{!quicksave}"/>
          </apex:pageBlockButtons>
               
          <apex:pageBlockSection>
   <apex:inputField value="{!Customer__c.Owner}"/>
 <apex:inputField value="{!Customer__c.First_Name__c}"/>
  <apex:inputField value="{!Customer__c.city__c}"/>
 <apex:inputField value="{!Customer__c.Branch__c}"/>
   </apex:pageBlockSection>
   </apex:pageBlock>
   </apex:form>
</apex:page>
Hope this helps.

Thanks,
Nagendra