---
schema_version: "1"
id: d259b04b37f859be6026bd1987cec0adcabb5e883150cefc5558dfe9c81ff691
title: Survey
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_survey.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_survey.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f2ccd6486236541397b3bd36a41e55f546e20f96e76482cd4b5bfd45b4bacfad
description: Represents a survey.
---
# Survey

Represents a survey.

## Supported Calls

describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search()

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

You can’t define custom fields for the Survey object using the Object Manager.

## Fields

| Field Name | Details |
| --- | --- |
| ActiveVersionID | 
Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The ID of the survey version currently activated.



 |
| Description | 

Type

string

Properties

Nillable

Description

The description of the survey. This field isn’t visible in the UI.



 |
| DeveloperName | 

Type

string

Properties

Filter, Group, Sort

Description

The survey’s unique API name.



 |
| IsPartialSaveEnabled | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort

Description

Indicates whether to save the partial responses for the survey (true) or not (false).

The default value is false.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time that the current user last viewed a record related to the survey.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed the survey.



 |
| LatestVersionId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID of the most recent version of this survey.



 |
| Name | 

Type

string

Properties

Filter, Group, Sort

Description

The name of the survey that appears in the UI. This field is read-only from API version 50.0.



 |
| NamespacePrefix | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The namespace prefix that is associated with this object. Each Developer Edition org that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix\_\_componentName notation.

The namespace prefix can have one of the following values.

- In Developer Edition orgs, NamespacePrefix is set to the namespace prefix of the org for all objects that support it, unless an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition org of the package developer.
- In orgs that are not Developer Edition orgs, NamespacePrefix is set only for objects that are part of an installed managed package. All other objects have no namespace prefix.





 |
| OwnerId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID of the user who created the survey.



 |
| SurveyType | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Type of the survey. The default value is Survey.

Possible values are:

- ASSESSMENT — Survey type for sales enablement teams. Available from API version 58.0 and later.
- BASIC — Survey with a question page with like or dislike, long text, multiple selection, NPS, rating, short text, and single selection questions, and without inserted participant responses, display logic, and page branching logic.
- SURVEY — Survey with all the available features.





 |
| TotalVersionsCount | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

The number of versions of the survey.



 |

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[SurveyChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.")

Change events are available for the object.

[SurveyFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.") (API version 42.0)

Feed tracking is available for the object.

[SurveyOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[SurveyShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.