Unable to redirect Salesforce links to Salesforce App

Solution 1:

To open Salesforce links within Salesforce app, you should encode them following the correct scheme.

A request to Salesforce for Android and iOS URL scheme follows this format:

<scheme_name>://sObject/<id>/<action>

Let’s break down each parameter of the URL scheme format:

  • scheme_name: Supported Salesforce for Android and iOS scheme names.
  • sObject: Indicates a single instance of a Salesforce object.
  • id: The unique single instance of a Salesforce object. id lengths of 15 and
  • 18 characters are supported.
  • action: Supported URL scheme operations

For example, to open Salesforce for Android and iOS and navigate to a specific record, the URL scheme will look similar to:

salesforce1://sObject/001D000000Jwj9v/view

Scheme Names

Salesforce supports the following scheme_name parameters for URL schemes:

  • salesforce1://

Actions

These are the available action parameters for URL schemes.

  • view: Navigates the user to the Salesforce app to view a record in detail.
  • edit: Navigates the user to the edit detail page of a record.
  • home: Navigates the user to the home page of an object.
  • download: Download any version of a file.
  • follow: Follow users to see their posts, comments, and likes in your feed.

Note: The user must have proper permissions to view, edit, download, etc within Salesforce directly, so if it's not opening the correct section of the Salesforce app - first validate they have access to the actions you're attempting to bring them to - otherwise they usually end up on the home screen.

Resource Links: https://resources.docs.salesforce.com/sfdc/pdf/salesforce1_url_schemes.pdf https://success.salesforce.com/answers?id=9063A000000l3wlQAA