Log in to a Sandbox or Community

This guide will cover how to access a Sandbox or a Community (or a Sandbox Community) on a container application.

Versions

No version restrictions.

This guide is for iOS, Android and Windows 10.

Prerequisites

This guide assumes you have:

  • A container application that is installed on your target OS (iOS, Android, Windows)
  • A Sandbox or Community endpoint that you can use to login to

Why

You may need to change your login host in a container app if the login host you require is not set as the initial login host. This could be during the development or QA phase when you need to login to a Sandbox or Community Sandbox.

How To

The steps are different depending on the OS that you are using. Follow the section for your OS below. The steps below assume that you have already downloaded and installed your container app on your device.

iOS

First, navigate to the settings for your container app by:

  1. Open the Settings app from your home screen
  2. Scroll down to find your container application’s name in the list of installed applications

If you know that the login host you require is part of the pre-set login hosts available:

  1. Tap on “Login Host”
  2. Select the required login host from the list available
  3. Open your container app

Otherwise, if the login host you require is not part of the pre-set login hosts:

  1. Tap on “Login Host”
  2. Select “Custom Host”
  3. Return to the previous screen by pressing the back button in the top left
  4. Underneath the “Login Host” button is a text field where you can specify your custom login host. Tap this box and enter the required login host (eg. myorg-developer-edition.eu11.force.com/mycommunity) Note: You should not add “https://” to the URL. This is done automatically by the container app.
  5. Open your container app
  6. You can now login using the correct credentials for this login end point

Android

First, navigate to the settings for your container app by:

  1. Open your container app
  2. At the top right, tap on the menu button
  3. Tap on “Change Server”

If you know that the login host you require is part of the pre-set login hosts available:

  1. Tap on the required login host from the list displayed
  2. Tap “Apply”

Otherwise, if the login host you require is not part of the pre-set login hosts:

  1. Tap on “Add Connection”
  2. Fill in the Name and the URL (eg. Name: “Test Community”, URL: myorg-developer-edition.eu11.force.com/mycommunity) Note: Unlike iOS, “https://” must be used
  3. Tap “Apply”
  4. Select the newly added login host from the list
  5. Tap “Apply”

You can now login using the correct credentials for this login end point

Windows 10

Windows 10 does not have a pre-set list of available login hosts available to configure, however, you can still specify a custom login endpoint. There are two ways you can set the login endpoint, the first method is useful for times where you may only want to launch the app once with an alternative endpoint and can be achieved through the use of the Windows Command Prompt. The second way is useful if you will be launching the app multiple times, or if you do not want your testers to have to go through the Command Prompt and is configured by editing the properties of the shortcut to your app.

via Shortcut Properties

  1. Find the shortcut on your desktop for your container app
  2. Right-click the shortcut, and click Properties Windows Shortcut Context Menu
  3. In the Target text box, add the following to the end of the existing value to change your login endpoint to your desired endpoint:

    where “https://myLoginEndpoint.my.force.com” is the login endpoint that you want to use. For example, if your current Target text box contained

    and you wanted to use https://myLoginEndpoint.my.force.com as your login endpoint, then you should update the Target to:

    Windows Shortcut Properties
  4. Click Apply. If you are prompted to provide administrator permissions to change these settings, click Continue, or ask an administrator to complete this step for you. Windows Confirmation Box
  5. Click OK
  6. Launch your container app by double-clicking the shortcut on your desktop.

Note If you have multiple shortcuts or multiple places from which you can launch the app (for example the Start Menu or the Task Bar), each one should be updated if you wish to use the new endpoint from each shortcut.

To set the container app back to the original login endpoint, simply follow the steps above again but this time remove the changes you made so that your Target text box only contains the path for the executable.

via Windows Command Prompt

  1. Open the Command Prompt (CMD) application – you can find it by searching for “Command Prompt” from the Windows Start Menu
  2. Use the “cd” command to change directory to the location where you installed your container application, for example, for a container application called “MyExampleContainerApp” installed to the standard “Program Files” folder on the C:/ drive we would use the following command (including quotation marks): “cd C:Program FilesMyExampleContainerApp”
  3. Run the following command, changing the URL in the example with your required login host (Sandbox or Community) and changing the example container app name to your own container app name (including quotation marks): “MyExampleContainerApp.exe” d false custom “https://test.salesforce.com”

The application should now launch at the required login host. You can now login using the correct credentials for this login end point.

An example prompt is provided below:

Note: If your container application has spaces in the name make sure to wrap the .exe file name with double quotation marks as in the above example. You should also wrap your url in double quotation marks too.