Reader small image

You're reading from  Visualforce Development Cookbook

Product typeBook
Published inSep 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781782170808
Edition1st Edition
Languages
Right arrow
Author (1)
Keir Bowden
Keir Bowden
author image
Keir Bowden

Keir Bowden is a 30-year veteran of the IT industry from the United Kingdom. After spending the early part of his career in the defence industry, he moved into investment banking systems, implementing systems for Banque Nationale de Paris, CitiGroup, and Deutsche Bank. In the late 1990s, Keir moved into Internet technologies, leading to a development of the order management and payment handling systems of one of the first European Internet shopping sites. Keir started working with Force.com in late 2008 and has been recognized multiple times by Salesforce as an MVP for his contribution and leadership in the community. In 2012, he became the first certified technical architect outside of Salesforce in EMEA, and he has served as a judge on several EMEA Technical Architect Certification Review Boards. Keir is also a prominent blogger on Apex, Visualforce and Lightning Components solutions; and a regular speaker at events such as Dreamforce, Cloud World Forum, and Salesforce World Tour. Keir is a chief technical officer of BrightGena—a Salesforce.com Platinum Cloud Alliance Partner in the United Kingdom, where he is responsible for the present and future technical strategies. Keir acted as a technical reviewer for the CRM Admin Cookbook before accepting the challenge of authoring this book, which also happens to be his first.
Read more about Keir Bowden

Right arrow

Editing a record in Visualforce


The standard record edit page does not allow customization outside the layout of fields. Editing records with Visualforce pages allows customization of all aspects of the page, including styling, content, and displayed buttons.

In this recipe, we will create a Visualforce page that provides contact edit capability, but does not allow a contact to be reparented to a different account. The account lookup field is editable until the record is saved with the lookup populated, after which it becomes read-only. This page will also render a different section heading depending on whether the contact is being created or edited.

Getting ready

This recipe makes use of a standard controller, so we only need to create the Visualforce page.

How to do it…

  1. Navigate to the Visualforce setup page by clicking on Your Name | Setup | Develop | Pages.

  2. Click on the New button.

  3. Enter ContactCreateEdit in the Label field.

  4. Accept the default ContactCreateEdit that is automatically generated...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Visualforce Development Cookbook
Published in: Sep 2013Publisher: PacktISBN-13: 9781782170808

Author (1)

author image
Keir Bowden

Keir Bowden is a 30-year veteran of the IT industry from the United Kingdom. After spending the early part of his career in the defence industry, he moved into investment banking systems, implementing systems for Banque Nationale de Paris, CitiGroup, and Deutsche Bank. In the late 1990s, Keir moved into Internet technologies, leading to a development of the order management and payment handling systems of one of the first European Internet shopping sites. Keir started working with Force.com in late 2008 and has been recognized multiple times by Salesforce as an MVP for his contribution and leadership in the community. In 2012, he became the first certified technical architect outside of Salesforce in EMEA, and he has served as a judge on several EMEA Technical Architect Certification Review Boards. Keir is also a prominent blogger on Apex, Visualforce and Lightning Components solutions; and a regular speaker at events such as Dreamforce, Cloud World Forum, and Salesforce World Tour. Keir is a chief technical officer of BrightGena—a Salesforce.com Platinum Cloud Alliance Partner in the United Kingdom, where he is responsible for the present and future technical strategies. Keir acted as a technical reviewer for the CRM Admin Cookbook before accepting the challenge of authoring this book, which also happens to be his first.
Read more about Keir Bowden