O'Reilly logo

Visualforce Development Cookbook by Keir Bowden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing the user's location

Mobile devices, by their very nature, are used on the move and applications often need to capture the location of the user in order to provide the best user experience; for example, showing proximity to a business or services, or allowing them to check-in at a destination.

In this recipe we will create a mobile Visualforce page to capture a lead and the location of the user. The location will be stored on the lead record in the Salesforce database.

Getting ready

This recipe requires a custom field on the lead sObject to capture the location.

  1. Navigate to the lead fields setup page by clicking on Your Name | Setup | App Setup | Customize | Lead | Fields.
  2. Scroll down to the Lead Custom Fields and Relationships section and click ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required