Task

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.

Note
Task fields related to calls are exclusive to Salesforce CRM Call Center.

Supported Calls

create(), update(), delete(), query(), search(), retrieve(), getDeleted(), getUpdated(), describeSObjects(), upsert()

Fields

Field Field Type Field Properties Description
AccountId reference Filter

Nillable

ID of the associated Account. For information on IDs, see ID Field Type.
ActivityDate date Create

Filter

Nillable

Update

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.
Note
This field cannot be set or updated for a recurring task (IsRecurrence is true).
CallDisposition string Create

Filter

Nillable

Update

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

Filter

Nillable

Update

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

Filter

Nillable

Update

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

Filter

Nillable

Update

The type of call being answered: Inbound, Internal, or Outbound.

ConnectionReceivedId reference Filter

Nillable

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

Nillable

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

Nillable

Update

Text description of the task.
IsClosed boolean Defaulted on create

Filter

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

Filter

Indicates whether the record has been moved to the Recycle Bin (true) or not (false).

Label is Deleted.

IsRecurrence boolean Create

Defaulted on create

Filter

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

Defaulted on create

Filter

Update

Indicates whether a popup reminder has been set for the task (true) or not (false).
IsVisibleInSelfService boolean Defaulted on create

Filter

Update

Indicates whether a task associated with an object can be viewed in the Customer Portal (true) or not (false).
OwnerId reference Create

Defaulted on create

Filter

Update

ID of the User who owns the record. For information on IDs, see ID Field Type. Label is Assigned To ID.
Priority picklist Create

Filter

Update

Required. Indicates the importance or urgency of a task, such as high or low.
RecurrenceActivityId reference

Filter

Nillable

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

Filter

Nillable

Update

The day of the month on which the task repeats.
RecurrenceDayOfWeekMask int Create

Filter

Nillable

Update

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:
  • Sunday = 1
  • Monday = 2
  • Tuesday = 4
  • Wednesday = 8
  • Thursday = 16
  • Friday = 32
  • Saturday = 64
Multiple days are represented as the sum of their numerical values. For example, Tuesday and Thursday = 4 + 16 = 20.
RecurrenceEndDateOnly date Create

Filter

Nillable

Update

The last date on which the task repeats.
RecurrenceInstance picklist Create

Filter

Nillable

Restricted picklist

Update

The frequency of the recurring task. For example, “2nd” or “3rd.”
RecurrenceInterval int Create

Filter

Nillable

Update

The interval between recurring tasks.
RecurrenceMonthOfYear picklist Create

Filter

Nillable

Restricted picklist

Update

The month of the year on which the task repeats.
RecurrenceStartDateOnly date Create

Filter

Nillable

Update

The date when the recurring task begins. Must be a date and time before RecurrenceEndDateOnly.
RecurrenceTimeZoneSidKey picklist Create

Filter

Nillable

Restricted picklist

Update

The time zone associated with the recurring task. For example, “UTC-8:00” for Pacific Standard Time.
RecurrenceType picklist Create

Filter

Nillable

Restricted picklist

Update

Indicates how often the task repeats. For example, daily, weekly, or every nth month (where “Nth” is defined in RecurrenceInstance).
ReminderDateTime dateTime Create

Filter

Nillable

Update

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

Filter

Update

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.
Note
This field cannot be updated for recurring tasks (IsRecurrence is true).
Subject combobox Create

Filter

Nillable

Update

The subject line of the task, such as “Call” or “Send Quote.”
WhatId reference Create

Filter

Nillable

Update

ID of a related Account, Opportunity, Campaign, Case, or custom object. Label is Opportunity/Account ID.
WhoId reference Create

Filter

Nillable

Update

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.

Usage

For information about working with archived tasks, see Archived Activities.

Recurring Tasks
  • Recurring tasks are available in API version 16.0 and later.
  • After a task is created, it cannot be changed from recurring to nonrecurring or vice versa.
  • When you delete a recurring task series through the API, all open and closed task occurrences in the series are removed. However, when you delete a recurring task series through the Salesforce.com user interface, only open tasks occurrences (IsClosed is false) in the series are removed.
  • If IsRecurrence is true, then RecurrenceStartDateOnly, RecurrenceEndDateOnly, RecurrenceType, and any properties associated with the given recurrence type (see the following table) must be populated.
  • When you change the RecurrenceStartDateOnly field or the recurrence pattern, all open tasks occurrences in the series are deleted and new open task occurrences are created based on the new recurrence pattern. The recurrence pattern is determined by the following fields: RecurrenceType, RecurrenceTimeZoneSidKey, RecurrenceInterval, RecurrenceDayOfWeekMask, RecurrenceDayOfMonth, RecurrenceInstance, and RecurrenceMonthOfYear.
  • When you change the value of RecurrenceEndDateOnly to an earlier date (for example, from January 20th to January 10th), all open task occurrences in the series with the ActivityDate value greater than the new end date value are deleted. Other open and closed task occurrences in the series are not affected.
  • When you change the value of RecurrenceEndDateOnly to a later date (for example, from January 10th to January 20th), new task occurrences are created up to the new end date. Existing open and closed tasks in the series are not affected.

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
© Copyright 2000-2009 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.