---
url: /process-functions/security-application-screen.md
description: A single screen in an application.
---

# &#x20;ApplicationScreen&#x20;

A single screen in an application.

```js
const app = security.application("My Application");
const screen = app.screens.get("Planner");

screen.setHomepage();
```

## Constructor

Returned by [create()](/process-functions/security-application-screens#create) and [get()](/process-functions/security-application-screens#get) on an application's [screens](/process-functions/security-application-screens). It can't be created directly.

## Methods

### id `id()`  {#id}

Returns the screen's id.

### title `title()`  {#title}

Returns the screen's title.

### setTitle `setTitle(title)`  {#settitle}

Changes the screen's title.

| Parameter | Type | Description |
|---|---|---|
| `title` | `string` | The new title, up to 150 characters. |

### route `route()`  {#route}

Returns the screen's route.

### setRoute `setRoute(route)`  {#setroute}

Changes the screen's route.

| Parameter | Type | Description |
|---|---|---|
| `route` | `string` | The new route, up to 150 characters. It must be unique in the application. |

### page `page()`  {#page}

Returns the id of the page shown on the screen.

### pageType `pageType()`  {#pagetype}

Returns the type of page shown on the screen: `"workview"`, `"card"` or `"page"`.

### pageName `pageName()`  {#pagename}

Returns the name of the page shown on the screen.

### setPage `setPage(type, id)`  {#setpage}

Changes the page shown on the screen.

| Parameter | Type | Description |
|---|---|---|
| `type` | `string` | `"workview"`, `"card"` or `"page"`. |
| `id` | `string` | The page's id. |

### header `header()`  {#header}

Returns the id of the page used as the screen's header, or `null` when there's no header.

### setHeader `setHeader(header)`  {#setheader}

Changes the screen's header.

| Parameter | Type | Description |
|---|---|---|
| `header` | `string` | The id of the page to use as the header. Pass `""` to remove it. |

### footer `footer()`  {#footer}

Returns the id of the page used as the screen's footer, or `null` when there's no footer.

### setFooter `setFooter(footer)`  {#setfooter}

Changes the screen's footer.

| Parameter | Type | Description |
|---|---|---|
| `footer` | `string` | The id of the page to use as the footer. Pass `""` to remove it. |

### setHomepage `setHomepage()`  {#sethomepage}

Makes this screen the application's homepage.

### remove `remove()`  {#remove}

Deletes the screen from the application. Returns `true` when it was deleted.

### json `json()`  {#json}

Returns the screen as an object, with its `id`, `title`, `page`, `route`, `header`, `footer`, `page_type` and `page_name`.

## Examples

```js
const app = security.application("My Application");
const screen = app.screens.get("Planner");

screen.setTitle("Planning");
screen.setPage("workview", "workview-id");
screen.setHomepage();

console.log(screen.json());
```

## Related

* [ApplicationScreens](/process-functions/security-application-screens): creates and finds screens.
