Accessibility
Jeanette Stallons

Jeanette Stallons

stallons.com

Table of Contents

Created:
2 November 2009
User Level:
Beginner
Products:
Flex

Building a desktop application with Flash Builder for Force.com – Part 3: Retrieve and display salesforce.com data

The first time a user logs in to a Force.com Flex application, a web service call is automatically made to Force.com to retrieve all of the salesforce.com data specified in the logged-in user's offline briefcase. A local database is created with matching tables and all the salesforce.com data is saved locally. While the application is open and the user is online, periodic calls are automatically made to the Force.com cloud (by default, every 20 minutes) and the local data store and the Force.com cloud are updated with any changes that have been made. Whenever a user subsequently logs in to this application, the local data is synced to the Force.com cloud data. If the user is offline, the cached local data will be used until the user goes back online and the data is synced again.

In this tutorial, you retrieve and display salesforce.com data from the local database. You use Stratus classes to retrieve the data and then use Stratus UI components to display the data. If the data is updated at any time by automatic or explicit syncing with the cloud, the displayed data will be updated.

In this tutorial, you will:

  • Define ActionScript properties and methods.
  • Register to listen for events and create event handlers.
  • Retrieve salesforce.com data from the local data store.
  • Create responders to handle successful and unsuccessful calls for asynchronous methods.
  • Use the Flash Builder debugger to view the salesforce.com data retrieved.
  • Use the Stratus LabelAndField component to display one field of an object.
  • Use the Stratus FieldContainer and LabelAndField components to display multiple fields of an object.
  • Log in to the application and view data when offline

Requirements

To complete this tutorial, you need the following:

A Force.com account with the custom Merchandise object created in Part 1 of this tutorial series:

Adobe Flash Builder for Force.com

Tutorial files:

Prerequisite knowledge

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

About the author

Jeanette Stallons is an independent Flex trainer and consultant who has taught for many companies including Adobe, Oracle, Boeing, Wachovia, Morgan Stanley, and Charles Schwab. Prior to working for herself, Jeanette worked at Allaire, Macromedia, and then Adobe in the training department, architecting, writing, teaching, and building applications for Flash, Flex, and other products. Her latest project is the Adobe Flex Learning Paths Flex application for which she was and continues to remain the idea behind, the programmer, and the content expert.