Offline access to your Salesforce data

Did you know that it is possible to access and edit your Salesforce data when you are offline?
Although we are surrounded by internet connectivity most of the time, we are constantly on-the-go and having access to important data, even without internet access, is a great advantage.

So how does offline view and edit access actually work? Offline access is possible when caching and Offline Edit is enabled for users. When a user initially logs into Salesforce, the cache is empty as no records have been accessed yet from the app. However, the most recently accessed records can be populated into the cache by navigating to Settings>Offline Cache>Cache Now.

    
The Cache includes records from the five most recently accessed objects and recent activity and dashboard from both the Salesforce1 app and Salesforce.com website. There are 2 ways the cache is updated; either manually or automatically. It automatically refreshes after each hour so that the user’s most recently accessed records are viewable. It can also be manually refreshed by the user himself anytime he wants to update the cache by clicking on the Cache Now button. The following screenshot shows the five most recently accessed objects in the navigation menu which allows them to be accessed offline:

The following screenshot shows the account’s record “Acme” is present in the cache which was recently accessed from Salesforce.com online and is now being viewed offline via Salesforce1.

The following screenshot shows the Contact’s record present in the cache which was recently accessed from Salesforce.com online and is now being viewed offline via Salesforce1.

The following screenshot shows the Leads’ records present in the cache which was recently accessed from Salesforce.com online and is now being viewed offline via Salesforce1.

The following screenshot shows the Opportunities records present in the cache which was recently accessed from Salesforce.com online and is now being viewed offline via Salesforce1.

The record will stay in the Cache for 30 days until it is accessed again upon which the clock will reset; otherwise, it will be removed from the cache after 30 days. The cache remains if the user is logged in and will be emptied if the user logs out. When he logs in again, the whole caching process will start again. The following screenshot shows the time for the last cached data under Offline cache.

The following lists the Salesforce Elements that can be viewed offline:

  • Navigation Menu
  • Action bar
  • Global Search
  • List Views
  • Record for recent objects
  • Records for Other Objects
  • Related Records
  • Salesforce Today
  • Salesforce Events
  • Tasks
  • Notes
  • Files
  • Feeds,Groups and People
  • Notifications
  • Salesforce1 Settings

 

Changes to records while Offline with Caching enabled

A remarkable new feature for Salesforce1 is that it allows changes to records like Offline Edit, Offline Create, and Offline Delete. This option is however only possible with caching enabled and will not work if you disable caching. The option for editing, deleting, and creating needs to be enabled by Salesforce. Once this option is enabled, the user can create records, edit, or delete them for the available cached objects. Thus, online connectivity is not required to make changes to the platform, hence making it easy to complete tasks on-the-go. Once the user is online and connected to a network, the Salesforce1 app will automatically synchronize the new data with the platform. In case of a conflict with the original data, Salesforce will throw an exception allowing users to rectify the changes.

Offline File Settings can be changed by going to Settings>Offline File Settings and selecting Auto-Sync Offline Files (when connected to Wi-Fi). When this checkbox is selected, changes will be auto-synced.

There are two kinds of Offline Access; one is just viewing and the second is being able to edit, create, and delete records with Offline Edit enabled. To enable this option for modification in Salesforce, go to Setup>Enable Caching and then Setup> Enable Offline Edit, Create and Delete in Salesforce1(Beta) and then select Save.

Once this option is enabled, go to any of the cached objects homepage. To create a NEW Record, press the New button on the top of the homepage. The following screenshot shows the New record for account being created. Once the information is entered, press Save to save the record. The new record will be synced with the Salesforce.com platform once the user goes online.

To Edit the record, go to the records detail page and press the Edit button in the action bar at the bottom of the page.

  

Once again, any changes made will be updated to the system once the user goes online.

The record can also be Deleted by pressing the delete button in the action bar on the bottom of the records detail page.

All the changes made can be viewed by selecting the Pending Changes button in the navigation menu. The page that opens will list the changes made when offline. When all changes have been updated, the screen shows the following note “You’re up to date. There are no pending changes.”

    

The bell-shaped icon on the top right bar of the Pending Changes page displays any pending Notifications the user must address.

A green indicator on the Pending Changes page will indicate that changes have been made that need to be updated in the system when the user goes online. A yellow indicator signals issues in the new data that must be addressed once the user is online. A red indicator signals an unresolvable issue, and the updates cannot be made when the user goes online. The issue can be due to validation errors if a validation rule exists that prevent the change. It can also be due to user permissions if the user who made the change did not have the required permissions. To resolve the issues, the user will be notified via a popup alert or in the Pending Changes page. If there are no issues, the changes will be synced perfectly and completely with the system.

The following demonstrates when an account is created in Offline mode and Saved. The homepage for the object displays the message “You have records that are pending sync” next to a green indicator.

   
 

The Pending Changes Tab in Settings in the Navigation menu displays (1) i.e. the number of changes to be synced once the user is online.

The following example shows an opportunity field Amount being edited to 7,899.00:

Once it is saved, the opportunity detail page displays the green indicator indicating changes need to be synced.

Once the user goes online, the system tries to sync the record updated, but as show,n the record was edited online on salesforce.com, and there is a conflict. The yellow indicator indicates this conflict and messages are displayed: “Pending Changes require your attention” and “There were issues matching the field values you entered. Choose the correct values to resolve”.

    
Once the correct value is selected, the opportunity saves successfully.

For Android users, it requires version 10.0 of the Salesforce1 app, and for the iOS, the Salesforce1 downloadable app.

What Certification are you studying for now?

Focus on Force currently provides practice exams and study guides for ten certifications