---
schema_version: "1"
id: ca42ff4729936b4ac8d9c5cdf9843d8b5b75cfebeff5a69d24b50c92ecd05203
title: getDisplayLocation()
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_canvas_EnvironmentContext_getDisplayLocation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_canvas_EnvironmentContext_getDisplayLocation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b18de4a90cacc9c6456824ce4d262e9feac53c28ce688fa84913412e53c56edf
description: Retrieves the display location where the canvas app is being called from. For example, a value of Visualforce page.
---
# getDisplayLocation()

Retrieves the display location where the canvas app is being called from. For example, a value of Visualforce page.

## Signature

public String getDisplayLocation()

## 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:

- Chatter—The canvas app was called from the Chatter tab.
- ChatterFeed—The canvas app was called from a Chatter canvas feed item.
- MobileNav—The canvas app was called from the navigation menu.
- OpenCTI—The canvas app was called from an Open CTI component.
- PageLayout—The canvas app was called from an element within a page layout. If the displayLocation is PageLayout, one of the subLocation values might be returned.
- Publisher—The canvas app was called from a canvas custom quick action.
- ServiceDesk—The canvas app was called from a Salesforce Console component.
- Visualforce—The canvas app was called from a Visualforce page.
- None—The canvas app was called from the Canvas App Previewer.

## Usage

Use this method to obtain the display location for the canvas app.