« Logging In Outside of Work | Main | The Correct Values for Salesforce Checkbox Import Field »

Create a New Record for Object in Visual Force

 Use "Standard Controller"

By using the "SAVE" or "QUICKSAVE" actions, you can create a new record. The following is an example of creating a new contact:

<apex:page standardController="Contact">
<apex:pageBlock title="My Content" mode="edit">
<apex:commandButton action="{!save}" value="Save"/>
<apex:pageBlockSection title="Content Section" columns="2">
<apex:inputField value="{!}"/>
<apex:inputField value="{!contact.type}"/>

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (1)

good post but please provide full example
April 20, 2015 | Unregistered Commenterp singh

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
All HTML will be escaped. Hyperlinks will be created for URLs automatically.