---
schema_version: "1"
id: d083bcf9e2348c76a998b9bfb3ba77cc5e4dc159b03eb84cad1225623da85c91
title: OutOfOffice
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_outofoffice.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_outofoffice.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d4fe225bf401613e8c2d608c64b8b2f4a1068daff3c468bf6aa006700c337cc8
description: Represents a user-set value on a profile that shows when the user intends to be out of the office. This object is available in API version 41.0 and later.
---
# OutOfOffice

Represents a user-set value on a profile that shows when the user intends to be out of the office. This object is available in API version 41.0 and later.

## Supported Calls

create(), delete(), query(), undelete(), upsert(), update()

## Special Access Rules

In Lightning Experience, lets users set a message next to their name in Chatter to show when they plan to be out of the office. The message appears in Lightning Experience, Salesforce Classic, and mobile views. Messages expire automatically after their end date. You can control whether out-of-office functionality is available to your users. Set it up in the Out of Office section in **Setup** | **Chatter Settings**.

Only internal users can set an out-of-office message.

## Fields

| Field Name | Details |
| --- | --- |
| EndDate | 
Type

dateTime

Properties

Create, Filter, Sort, Update

Description

The date of the last day a person is out of the office. After the message expires, it goes away automatically.



 |
| IsEnabled | 

Type

[boolean](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/primitive_data_types.htm)

Properties

Create, Defaulted on create

Description

Indicates whether an out-of-office message can be displayed for a user. The default value is true.



 |
| Message | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The message portion of the out-of-office message. This text, along with start and end dates, is appended to the user’s name in the Salesforce user interface. The maximum length of this string is 40 characters.



 |
| StartDate | 

Type

dateTime

Properties

Create, Filter, Sort, Update

Description

The date of the first day a person is out of the office.



 |
| UserId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the user associated with the out-of-office message.



 |

## Usage

- Maximum message length is 60 characters.
- Users can set only their own out-of-office message. An admin can set an out-of-office message for any user.
- The out-of-office message can be set only for internal users.