---
schema_version: "1"
id: d611ca810fde76c8074bdfadce6843da684d35e692dadd70ad04b67d2bfcbdb8
title: getSublocation()
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_canvas_EnvironmentContext_getSublocation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_canvas_EnvironmentContext_getSublocation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 151ed42a3b1d8d86085389c6ea6143d43058705da011fd48d64c53001a2136b4
description: Retrieves the display sublocation where the canvas app is being called from.
---
# getSublocation()

Retrieves the display sublocation where the canvas app is being called from.

## Signature

public String getSublocation()

## Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The return value can be one of the following strings:

- S1MobileCardFullview—The canvas app was called from a mobile card.
- S1MobileCardPreview—The canvas app was called from a mobile card preview. The user must click the preview to open the app.
- S1RecordHomePreview—The canvas app was called from a record detail page preview.  The user must click the preview to open the app.
- S1RecordHomeFullview—The canvas app was called from a page layout.

## Usage

Use this method to obtain the display sublocation for the canvas app. Use only if the primary display location can be displayed on mobile devices.