You need to sign in to do that
Don't have an account?
Bhola Vishwakarma
Use of Input Field...
<!-- For this example to render properly, you must associate the Visualforce page with a valid account record in the URL. For example, if 001D000000IRt53 is the account ID, the resulting URL should be: https://Salesforce_instance/apex/myPage?id=001D000000IRt53 See the Visualforce Developer's Guide Quick Start Tutorial for more information. --> <apex:page standardController="Account"> <apex:form > <apex:pageBlock title="My Content" mode="edit"> <apex:pageBlockButtons > <apex:commandButton action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:pageBlockSection title="My Content Section" columns="2"> <apex:inputField value="{!account.name}"/> <apex:inputField value="{!account.type}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
This is a code for the standard Object but If I want to insert/reference any custom object then how can i do that ?
I tried this things as I putted {!CustomObjectName__c.CustomFieldName__c} as value of the input field...
Regards....
All Answers
Name and Id are standard fields. They exists for custom object as well. So they need to be given as Name and Id only.
For other fields you need to append __c. Basically you need to give field's API name here. You have to get your fields API name from fields view page.
Yaa I got the thing after viewing the standard Object...
But Sonali, Again I get stuck on Record Type....
Basically There are two record type are there in my object & each record type has certain field so how can i use them in VFPage.
I tried to use <apex:param> tag too but could not get the actual idea to use it...
So please guide for it also to me...
Regards...