Represents a business activity such as making a phone call or other “to-do” items. In the Salesforce.com user interface, task and Event records are collectively referred to as activities.
create(), update(), delete(), query(), search(), retrieve(), getDeleted(), getUpdated(), describeSObjects(), upsert()
| Field | Field Type | Field Properties | Description |
|---|---|---|---|
| AccountId | reference | Filter | ID of the associated Account. For information on IDs, see ID Field Type. |
| ActivityDate | date | Create | The due date of the task. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it in order to accommodate time zone differences. Label is Due Date. |
| CallDisposition | string | Create |
Represents the result of a given call, for example, “we'll call back,” or “call unsuccessful.” Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center. |
| CallDurationInSeconds | int | Create |
Duration of the call in seconds. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center. |
| CallObject | string | Create |
Name of a call center. Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center. |
| CallType | picklist | Create |
The type of call being answered: Inbound, Internal, or Outbound. |
| ConnectionReceivedId | reference | Filter | ID of the PartnerNetworkConnection that shared this record with your organization. This field is only available if you have enabled Salesforce to Salesforce. |
| ConnectionSentId | reference | Filter | ID of the PartnerNetworkConnection that you shared this record with. This field is only available if you have enabled Salesforce to Salesforce. Beginning with API version 15.0, the ConnectionSentId field is no longer supported. The ConnectionSentId field is still visible, but the value is null. You can use the new PartnerNetworkRecordConnection object to forward records to connections. |
| Description | textarea | Create | Text description of the task. |
| IsClosed | boolean | Defaulted on create | Indicates whether the task was completed (true) or not (false). Is only set indirectly via the Status picklist. Label is Closed. |
| IsDeleted | boolean | Defaulted on create | Indicates whether the record has been moved to the Recycle
Bin (true) or not (false). Label is Deleted. |
| IsRecurrence | boolean | Create | Indicates whether the task is scheduled to repeat itself (true) or only occurs once (false). This is a read only field on update, but not on create. If this field value is true, then RecurrenceStartDateOnly, RecurrenceEndDateOnly, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. See Recurring Tasks. |
| IsReminderSet | boolean | Create | Indicates whether a popup reminder has been set for the task (true) or not (false). |
| IsVisibleInSelfService | boolean | Defaulted on create | Indicates whether a task associated with an object can be viewed in the Customer Portal (true) or not (false). |
| OwnerId | reference | Create | ID of the User who owns the record. For information on IDs, see ID Field Type. Label is Assigned To ID. |
| Priority | picklist | Create | Required. Indicates the importance or urgency of a task, such as high or low. |
| RecurrenceActivityId | reference | Read-only. Not required on create. ID of the main record of the recurring task. Subsequent occurrences have the same value in this field. | |
| RecurrenceDayOfMonth | int | Create | The day of the month on which the task repeats. |
| RecurrenceDayOfWeekMask | int | Create | The day or days of the week on which the task repeats.
This field contains a bitmask. For each day of the week, the values
are as follows:
|
| RecurrenceEndDateOnly | date | Create | The last date on which the task repeats. |
| RecurrenceInstance | picklist | Create | The frequency of the recurring task. For example, “2nd” or “3rd.” |
| RecurrenceInterval | int | Create | The interval between recurring tasks. |
| RecurrenceMonthOfYear | picklist | Create | The month of the year on which the task repeats. |
| RecurrenceStartDateOnly | date | Create | The date when the recurring task begins. Must be a date and time before RecurrenceEndDateOnly. |
| RecurrenceTimeZoneSidKey | picklist | Create | The time zone associated with the recurring task. For example, “UTC-8:00” for Pacific Standard Time. |
| RecurrenceType | picklist | Create | Indicates how often the task repeats. For example, daily, weekly, or every nth month (where “Nth” is defined in RecurrenceInstance). |
| ReminderDateTime | dateTime | Create | Represents the time the reminder is scheduled to fire, if IsReminderSet is set to true. If it is set to false, then the user may have deselected the reminder checkbox in the Salesforce.com user interface, or the reminder has already fired at the time indicated by the value. |
| Status | picklist | Create | Required. The current status of the task, such as In Progress or Completed. Each predefined Status field implies a value for the IsClosed flag. To obtain picklist values, a client application can invoke the query() call on the TaskStatus object. |
| Subject | combobox | Create | The subject line of the task, such as “Call” or “Send Quote.” |
| WhatId | reference | Create | ID of a related Account, Opportunity, Campaign, Case, or custom object. Label is Opportunity/Account ID. |
| WhoId | reference | Create | ID of a related Contact or Lead. If the WhoId refers to a lead, then the WhatId field must be empty. Label is Contact/Lead ID. |
For information about working with archived tasks, see Archived Activities.
The following table describes the usage of recurrence fields. Each recurrence type must have all of its properties set. All unused properties must be set to null.
| RecurrenceType Value | Properties | Example Pattern |
|---|---|---|
| RecursDaily | RecurrenceInterval | Every second day |
| RecursEveryWeekday | RecurrenceDayOfWeekMask | Every weekday - cannot be Saturday or Sunday |
| RecursMonthly | RecurrenceDayOfMonth RecurrenceInterval | Every second month, on the third day of the month |
| RecursMonthlyNth | RecurrenceInterval RecurrenceInstance RecurrenceDayOfWeekMask | Every second month, on the last Friday of the month |
| RecursWeekly | RecurrenceInterval RecurrenceDayOfWeekMask | Every three weeks on Wednesday and Friday |
| RecursYearly | RecurrenceDayOfMonth RecurrenceMonthOfYear | Every March on the twenty-sixth day of the month |
| RecursYearlyNth | RecurrenceDayOfWeekMask RecurrenceInstanceRecurrenceMonthOfYear | The first Saturday in every October |