Represents actions that can be performed when a record’s owner is changed. Available with these
options in API version 35.0 and later.
Fields
| options |
OwnerChangeOption[] |
Represents a flag for a specific action performed when changing a record owner through an update
or upsert call.
|
OwnerChangeOption Fields
| execute |
boolean |
If true, the action
represented by the type field is performed. If false, the action represented by
the type field is skipped.
|
| type |
enum of a string |
Represents the action performed or skipped, according to the
given value for the execute field, when changing a record owner
during an update or upsert call. The following types can be
used.
- EnforceNewOwnerHasReadAccess
- If true, the record’s new owner must have at least read
access on the record. Available in API version 36.0 and
later.
- TransferOpenActivities
- If true, the record’s open activities are transferred to
the new owner
- TransferNotesAndAttachments
- If true, the record’s notes, attachments, and Google
Docs are transferred to the new record owner. If false,
the original record owner retains ownership.
- TransferOtherOpenOpportunities
- If true and the record is an account, open opportunities
associated with the account and not owned by the current
record owner are transferred to the new owner.
TransferOwnedOpenOpportunities must be set to execute
when executing this option.
- TransferOwnedOpenOpportunities
- If true and the record is an account, open opportunities
associated with the account and owned by the account
owner are transferred to the new owner.
- TransferContracts
- If true and the record is an account, contracts
associated with the account and owned by the account
owner are transferred to the new owner.
- TransferOrders
- If true and the record is an account, the draft
standalone orders associated with the account and draft
orders associated with transferred contracts owned by
the account owner are transferred to the new owner.
- TransferContacts
- If true and the record is a business account, contacts
associated with the account are transferred to the new
owner.
|
Sample Code—Java
This sample creates an account, a note, an opportunity, and task for the account, and sets the
owner change options so that the note, opportunity and task are transferred to the
new owner along with account.