Newer Version Available
Core Data Types Used in API Calls
Many calls in the API use the following data types:
- sObject
- ID (String). See ID Field Type.
The API also uses several error handling objects. If an error occurs during a SOAP request, the API returns a SOAP fault message. The message contains different content, depending on the type of error:
- If an error affects the entire request, an API Fault Element, is returned, containing an ExceptionCode and the associated error message text.
- If the error affects some records and not others, an Error is returned, containing a StatusCode. These errors typically occur during bulk operations, such as creating, updating, or deleting multiple records with a single call.
sObject
An sObject represents an object, such as an Account or Campaign. For a list of standard objects, see Standard Objects.
An sObject has the following properties:
| Name | Type | Description |
|---|---|---|
| fieldsToNull | string[] | Array of one or more field names whose value you want to explicitly set to
null. When used with update() or upsert(), you can specify only those fields that you can update and that have the nillable property. When used with create(), you can specify only those fields that you can create and that have the nillable or the default on create property. For example, if specifying an ID field or required field results in a runtime error, you can specify that field name in fieldsToNull. Similarly, if a picklist field has a default value and you want to set the value to null instead, specify the field in fieldsToNull. |
| ID | ID | Unique ID for this individual object. For the create() call, this value is null. For all other API calls, this value must be specified. |
API Fault Element
An ApiFault element contains information about a fault that occurs when processing a service request. The ApiFault element has the following properties.
| Name | Type | Description |
|---|---|---|
| exceptionCode | ExceptionCode | A code that characterizes the exception. The full list of exception codes is available in the WSDL file for your org. See Generating the WSDL File for Your Organization. |
| exceptionMessage | string | Exception message text. |
| extendedErrorDetails | ExtendedErrorDetails | More details about the exception, including an extended error code and extra error properties, when available. Reserved for future use. |
The following table lists the API fault elements that represent all the API faults that can occur.
| Fault | Description |
|---|---|
| ApiQueryFault | The row and column numbers where the problem occurred. |
| LoginFault | An error occurred during the login() call. |
| InvalidSObjectFault | An invalid sObject in a describeSObject(), describeSObjects(), describeLayout(), describeDataCategoryGroups(), describeDataCategoryGroupStructures(), create(), update(), retrieve(), or query() call. |
| InvalidFieldFault | An invalid field in a retrieve() or query() call. |
| InvalidOrNullForRestrictedPicklist | An invalid appMenuType in a describeAppMenu() call. |
| MalformedQueryFault | A problem in the queryString passed in a query() call. |
| InvalidQueryLocatorFault | A problem in the queryLocator passed in a queryMore() call. |
| MalformedSearchFault | A problem in the search passed in a search() call. |
| InvalidIdFault | A specified ID was invalid in a setPassword() or resetPassword() call. |
| UnexpectedErrorFault | An unexpected error occurred. The error is not associated with any other API fault. |
ExceptionCode
The following list of ExceptionCode values is defined in your WSDL file. Some codes don’t appear in your WSDL, depending on the features you have enabled.
- API_CURRENTLY_DISABLED
- Because of a system problem, API functionality is temporarily unavailable.
- API_DISABLED_FOR_ORG
- API access has not been enabled for the org. Contact Salesforce to enable API access.
- CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY
- A user with a standard portal license can't be added to a territory.
- CIRCULAR_OBJECT_GRAPH
- The request failed because it contained a circular object reference.
- CLIENT_NOT_ACCESSIBLE_FOR_USER
- The current user does not have permission to access the specified client.
- CLIENT_REQUIRE_UPDATE_FOR_USER
- The current user is required to use a newer version of the specified client and doesn’t have access until the client is updated.
- CLONE_NOT_SUPPORTED
- This entity does not support the clone operation.
- CLONE_FIELD_INTEGRITY_EXCEPTION
- A field integrity exception occurred during the clone operation.
- DELETE_REQUIRED_ON_CASCADE
- The delete operation triggers a cascade delete on a record, but the logged-in user does not have delete permission on that related object.
- DUPLICATE_COMM_NICKNAME
- You can't create a user with the same nickname as another user.
- DUPLICATE_VALUE
- You can’t supply a duplicate value for a field that must be unique. For example, you can’t submit two copies of the same session ID in a invalidateSessions() call.
- EMAIL_BATCH_SIZE_LIMIT_EXCEEDED
- A method tried to process more email records than the maximum batch size.
- EMAIL_TO_CASE_INVALID_ROUTING
- An email to case record has been submitted for processing but the feature is not enabled.
- EMAIL_TO_CASE_LIMIT_EXCEEDED
- The daily converted email limit for the Email-to-Case feature has been exceeded.
- EMAIL_TO_CASE_NOT_ENABLED
- The Email-to-Case feature has not been enabled.
- EXCEEDED_ID_LIMIT
- Too many IDs were specified in a call. For example, more than 2000 IDs were requested in a retrieve() call, or more than 200 session IDs were specified in a logout() call.
- EXCEEDED_LEAD_CONVERT_LIMIT
- Too many IDs were sent to a convertLead() call.
- EXCEEDED_MAX_SIZE_REQUEST
- The size of the message sent to the API exceeded 50 MB.
- EXCEEDED_MAX_TYPES_LIMIT
- The number of object types to describe is too large.
- EXCEEDED_QUOTA
- The size limit for org data storage was exceeded during a create() call.
- FUNCTIONALITY_NOT_ENABLED
- Functionality has been temporarily disabled. Other calls continue to work.
- INACTIVE_OWNER_OR_USER
- The user or record owner is not active.
- INACTIVE_PORTAL
- The referenced portal is inactive.
- INSUFFICIENT_ACCESS
- The user does not have sufficient access to perform the operation.
- INVALID_ASSIGNMENT_RULE
- An invalid AssignmentRuleHeader value was specified.
- INVALID_BATCH_SIZE
- The query options have an invalid batch size value.
- INVALID_CLIENT
- The client is invalid.
- INVALID_CROSS_REFERENCE_KEY
- An invalid foreign key can’t be set on a field. For example, an object share, such as AccountShare, can’t be deleted because the share row is a result of a sharing rule.
- INVALID_FIELD
- The specified field name is invalid.
- INVALID_FILTER_LANGUAGE
- The specified language can't be used as a filter.
- INVALID_FILTER_VALUE
- A SOQL query with LIKE specified an invalid character, for example, an incorrectly placed asterisk (*). Correct the query and resubmit.
- INVALID_ID_FIELD
- The specified ID is correctly formatted but isn’t valid. For example, the ID is of the wrong type, or the object it identifies no longer exists.
- INVALID_GOOGLE_DOCS_URL
- An invalid Salesforce record URL was used when trying to associate a Google Doc to that record. Correct the URL before trying the operation again.
- INVALID_LOCATOR
- The locator is invalid.
- INVALID_LOGIN
- The login() credentials are not valid, or the maximum number of logins have been exceeded. Contact your administrator for more information.
- INVALID_NEW_PASSWORD
- The new password does not conform with the password policies of the org.
- INVALID_OPERATION
- The client application tried to modify a record that is locked by an approval process.
- INVALID_OPERATION_WITH_EXPIRED_PASSWORD
- Due to password expiration, a valid password must be set using setPassword() before the call can be invoked.
- INVALID_QUERY_FILTER_OPERATOR
- An invalid operator was used in the query() filter clause, at least for that field.
- INVALID_QUERY_LOCATOR
- An invalid queryLocator parameter was specified in a queryMore() call. It’s also possible that you've exceed the maximum number of calls, which is 10 per user for the API, and 5 for Apex and Visualforce.
- INVALID_QUERY_SCOPE
- The specified search scope is invalid.
- INVALID_REPLICATION_DATE
- The date for replication is out of the allowed range, such as before the org was created.
- INVALID_SETUP_OWNER
- The setup owner must be an Organization, Profile, or User.
- INVALID_SEARCH
- The search() call has invalid syntax or grammar. For more information, see the Salesforce SOQL and SOSL Reference Guide.
- INVALID_SEARCH_SCOPE
- The specified search scope is invalid.
- INVALID_SESSION_ID
- The specified sessionId is malformed (incorrect length or format) or has expired. Log in again to start a new session.
- INVALID_SOAP_HEADER
- There is an error in the SOAP header. If you are migrating from an earlier version of the API, be advised that the SaveOptions header can't be used with API version 6.0 or later. Use AssignmentRuleHeader instead.
- INVALID_SSO_GATEWAY_URL
- The URL provided to configure the Single Sign-On gateway was not a valid URL.
- INVALID_TYPE
- The specified sObject type is invalid.
- INVALID_TYPE_FOR_OPERATION
- The specified sObject type is invalid for the specified operation.
- LIMIT_EXCEEDED
- An array is too long. For example, there are too many BCC addresses, targets, or email messages.
- LOGIN_DURING_RESTRICTED_DOMAIN
- The user is not allowed to log in from this IP address.
- LOGIN_DURING_RESTRICTED_TIME
- The user is not allowed to log in during this time period.
- MALFORMED_ID
- An invalid ID string was specified. For information about IDs, see ID Field Type.
- MALFORMED_QUERY
- An invalid query string was specified. For example, the query string was longer than 100,000 characters.
- MALFORMED_SEARCH
- An invalid search string was specified. For example, the search string was longer than 100,000 characters.
- MISSING_ARGUMENT
- A required argument is missing.
- MIXED_DML_OPERATION
- There are limits on what kinds of DML operations can be performed in the same transaction. For more information, see the Lightning Platform Apex Code Developer's Guide.
- NOT_MODIFIED
- The describe call response has not changed since the specified date.
- NO_SOFTPHONE_LAYOUT
- If an org has the CTI feature enabled, but no softphone layout has been defined,
this exception is returned if a describe call is issued. This exception is most often
caused because no call center has been defined. A default softphone layout is created
during call center definition.
If an org doesn’t have the CTI feature enabled, FUNCTIONALITY_NOT_ENABLED is returned instead.
- NUMBER_OUTSIDE_VALID_RANGE
- The number specified is outside the valid range for the field.
- OPERATION_TOO_LARGE
- The query has returned too many results. If certain queries are run by a user without the “View All Data” permission and many records are returned, the queries require sharing rule checking. For example, consider queries that are run on objects, such as Task, that use a polymorphic foreign key. These queries return this exception because the operation requires too many resources. To correct, add filters to the query to narrow the scope, or use filters such as date ranges to break the query up into a series of smaller queries.
- ORG_LOCKED
- The org has been locked. Contact Salesforce to unlock the org.
- ORG_NOT_OWNED_BY_INSTANCE
- The user tried to log in to the wrong server instance. Choose another server instance or log in at https://login.salesforce.com. You can use http instead of https.
- PASSWORD_LOCKOUT
- The user has exceeded the allowed number of login attempts. The user must contact an administrator to regain login access.
- PORTAL_NO_ACCESS
- Access to the specified portal is not available.
- QUERY_TIMEOUT
- The query has timed out. For more information, see the Salesforce SOQL and SOSL Reference Guide.
- QUERY_TOO_COMPLICATED
- SOQL query is either selecting too many fields or there are too many filter conditions. Try reducing the number of formula fields referenced in the query.
- REQUEST_LIMIT_EXCEEDED
- Exceeded either the concurrent request limit or the request rate limit for your org. For details on API request limits, see API Usage Metering.
- REQUEST_RUNNING_TOO_LONG
- A request has taken too long to be processed.
- SERVER_UNAVAILABLE
- A server that is necessary for this call is unavailable. Other types of requests could still work.
- SSO_SERVICE_DOWN
- The service was unavailable, and an authentication call to the org’s specified Single Sign-On server failed.
- TOO_MANY_APEX_REQUESTS
- Too many Apex requests have been issued. If this exception persists, contact Salesforce Customer Support.
- TRIAL_EXPIRED
- The trial period for the org has expired. A representative from the company must contact Salesforce to re-enable the org.
- UNSUPPORTED_API_VERSION
- A method call was made that doesn’t exist in the accessed API version, for example, trying to use upsert() (new in 8.0) against version 5.0.
- UNSUPPORTED_CLIENT
- This version of the client is no longer supported.
Error
An Error contains information about an error that occurred during a create(), merge(), process(), update(), upsert(), delete(), or undelete() call. For more information, see Error Handling. An Error has the following properties:
| Name | Type | Description |
|---|---|---|
| statusCode | StatusCode | A code that characterizes the error. The full list of status codes is available in the WSDL file for your org (see Generating the WSDL File for Your Organization). |
| message | string | Error message text. |
| fields | string[] | Array of one or more field names. Identifies which fields in the object, if any, affected the error condition. |
| extendedErrorDetails | ExtendedErrorDetails | More details about the error, including an extended error code and extra error properties, when available. Reserved for future use. |
StatusCode
The following table lists API status codes that are returned with an error. Some codes don’t appear in your WSDL, depending on the features you have enabled.
- ALL_OR_NONE_OPERATION_ROLLED_BACK
- The bulk operation was rolled back because one of the records wasn't processed successfully. See AllOrNoneHeader.
- ALREADY_IN_PROCESS
- You can’t submit a record that is already in an approval process. Wait for the previous approval process to complete before resubmitting a request with this record.
- ASSIGNEE_TYPE_REQUIRED
- Designate an assignee for the approval request (ProcessInstanceStep or ProcessInstanceWorkitem).
- BAD_CUSTOM_ENTITY_PARENT_DOMAIN
- The changes you are trying to make can’t be completed because changes to the associated master-detail relationship can’t be made.
- BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED
- Your client application blind carbon-copied an email address even though the org’s Compliance BCC Email option is enabled. This option specifies a particular email address that automatically receives a copy of all outgoing email. When this option is enabled, you can’t BCC any other email address. To disable the option, log in to the user interface and from Setup, enter Compliance BCC Email in the Quick Find box, then select Compliance BCC Email.
- BCC_SELF_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED
- Your client application blind carbon-copied the logged-in user’s email address even though the org’s BCC COMPLIANCE option is set to true. This option specifies a particular email address that automatically receives a copy of all outgoing email. When this option is enabled, you can’t BCC any other email address. To disable the option, log in to the user interface and from Setup, enter Compliance BCC Email in the Quick Find box, then select Compliance BCC Email.
- CANNOT_CASCADE_PRODUCT_ACTIVE
- An update to a product caused by a cascade can't be done because the associated product is active.
- CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD
- You can't change the type of a field that is referenced in an Apex script.
- CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE
- You can create only one managed package in an org.
- CANNOT_DEACTIVATE_DIVISION
- You can't deactivate Divisions if an assignment rule references divisions or if the DefaultDivision field on a user record isn’t set to null.
- CANNOT_DELETE_LAST_DATED_CONVERSION_RATE
- If dated conversions are enabled, you must have at least one DatedConversionRate record.
- CANNOT_DELETE_MANAGED_OBJECT
- You can't modify components that are included in a managed package.
- CANNOT_DISABLE_LAST_ADMIN
- You must have at least one active administrator user.
- CANNOT_ENABLE_IP_RESTRICT_REQUESTS
- If you exceed the limit of five IP ranges specified in a profile, you can't enable restriction of login by IP addresses. Reduce the number of specified ranges in the profile and try the request again.
- CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
- You do not have permission to create, update, or activate the specified record.
- CANNOT_MODIFY_MANAGED_OBJECT
- You can't modify components that are included in a managed package.
- CANNOT_RENAME_APEX_REFERENCED_FIELD
- You can't rename a field that is referenced in an Apex script.
- CANNOT_RENAME_APEX_REFERENCED_OBJECT
- You can't rename an object that is referenced in an Apex script.
- CANNOT_REPARENT_RECORD
- You can't define a new parent record for the specified record.
- CANNOT_RESOLVE_NAME
- A sendEmail() call could not resolve an object name.
- CANNOT_UPDATE_CONVERTED_LEAD
- A converted lead could not be updated.
- CANT_DISABLE_CORP_CURRENCY
- You can’t disable the corporate currency for an org. To disable a currency that is set as the corporate currency, first use the user interface to change the corporate currency to a different currency. Then disable the original currency.
- CANT_UNSET_CORP_CURRENCY
- You can’t change the corporate currency for an org from the API. Use the user interface to change the corporate currency.
- CHILD_SHARE_FAILS_PARENT
- If you don’t have appropriate permissions on a parent record, you can’t change the owner of or define sharing rules for a child record. For example, you can’t change the owner of a contact record if you can’t edit its parent account record.
- CIRCULAR_DEPENDENCY
- You can't create a circular dependency between metadata objects in your org. For example, public group A can't include public group B, if public group B already includes public group A.
- COMMUNITY_NOT_ACCESSIBLE
- You do not have permission to access the Experience Cloud site that this entity belongs to. You must be given permission to access the site before you can access this entity.
- CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED
- You can't exceed the maximum size for a CLOB field.
- CUSTOM_ENTITY_OR_FIELD_LIMIT
- You have reached the maximum number of custom objects or custom fields for your org.
- CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED
- You have reached the maximum number of indexes on a field for your org.
- CUSTOM_INDEX_EXISTS
- You can create only one custom index per field.
- CUSTOM_LINK_LIMIT_EXCEEDED
- You have reached the maximum number of custom links for your org.
- CUSTOM_METADATA_LIMIT_EXCEEDED
- Your org has reached its custom metadata maximum limit.
- CUSTOM_SETTINGS_LIMIT_EXCEEDED
- Your org has reached its custom settings maximum limit.
- CUSTOM_TAB_LIMIT_EXCEEDED
- You have reached the maximum number of custom tabs for your org.
- DELETE_FAILED
- You can't delete a record because it is in use by another object.
- DEPENDENCY_EXISTS
- You can't perform the requested operation because of an existing dependency on the specified object or field.
- DUPLICATE_CASE_SOLUTION
- You can't create a relationship between the specified case and solution because it already exists.
- DUPLICATE_CUSTOM_ENTITY_DEFINITION
- Custom object or custom field IDs must be unique.
- DUPLICATE_CUSTOM_TAB_MOTIF
- You can't create a custom object or custom field with a duplicate master name.
- DUPLICATE_DEVELOPER_NAME
- You can't create a custom object or custom field with a duplicate developer name.
- DUPLICATES_DETECTED
- Duplicate records have been detected. Used for an Error object with a data type of DuplicateError.
- DUPLICATE_EXTERNAL_ID
- A user-specified external ID matches more than one record during an upsert.
- DUPLICATE_MASTER_LABEL
- You can't create a custom object or custom field with a duplicate master name.
- DUPLICATE_SENDER_DISPLAY_NAME
- A sendEmail() call could not choose between OrgWideEmailAddress.DisplayName or senderDisplayName. Define only one of the two fields.
- DUPLICATE_USERNAME
- A create, update, or upsert failed because of a duplicate user name.
- DUPLICATE_VALUE
- You can’t supply a duplicate value for a field that must be unique. For example, you can’t submit two copies of the same session ID in a invalidateSessions() call.
- EMAIL_ADDRESS_BOUNCED
- Emails to one or more recipients have bounced. Check the email addresses to make sure that they are valid.
- EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR
- Because of an error earlier in the call, the current email was not processed.
- EMAIL_OPTED_OUT
- A single email message was sent with the REJECT setting in the optOutPolicy field to recipients that have opted out from receiving email. To avoid this error, set the optOutPolicy field to another value.
- EMAIL_TEMPLATE_FORMULA_ERROR
- The email template is invalid and can’t be rendered. Check the template for incorrectly specified merge fields.
- EMAIL_TEMPLATE_MERGEFIELD_ACCESS_ERROR
- You don’t have access to one or more merge fields in this template. To request access, contact your Salesforce administrator.
- EMAIL_TEMPLATE_MERGEFIELD_ERROR
- One or more merge fields don’t exist. Check the spelling of field names.
- EMAIL_TEMPLATE_MERGEFIELD_VALUE_ERROR
- One or more merge fields have no value. To provide values, update the records before sending the email.
- EMAIL_TEMPLATE_PROCESSING_ERROR
- The merge fields in this email template can’t be processed. Ensure that your template body is valid.
- EMPTY_SCONTROL_FILE_NAME
- The Scontrol file name was empty, but the binary was not empty.
- ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE
- If the value in a record’s LastModifiedDate field is later than the current date, you can’t update the record .
- ENTITY_IS_ARCHIVED
- If a record has been archived, you can’t access it.
- ENTITY_IS_DELETED
- You can’t reference an object that has been deleted. This status code occurs only in API version 10.0 and later. Previous releases of the API use INVALID_ID_FIELD for this error.
- ENTITY_IS_LOCKED
- You can’t edit a record that is locked by an approval process.
- ENVIRONMENT_HUB_MEMBERSHIP_CONFLICT
- You can’t add an org to more than one Environment Hub.
- ERROR_IN_MAILER
- An email address is invalid, or another error occurred during an email-related transaction.
- FAILED_ACTIVATION
- The activation of a Contract failed.
- FIELD_CUSTOM_VALIDATION_EXCEPTION
- You can't define a custom validation formula that violates a field integrity rule.
- FIELD_FILTER_VALIDATION_EXCEPTION
- You can't violate field integrity rules.
- FILTERED_LOOKUP_LIMIT_EXCEEDED
- The creation of the lookup filter failed because it exceeds the maximum number of lookup filters allowed per object.
- HTML_FILE_UPLOAD_NOT_ALLOWED
- Your attempt to upload an HTML file failed. HTML attachments and documents, including HTML attachments to a Solution, can't be uploaded if the Disallow HTML documents and attachments checkbox is selected on the HTML Documents and Attachments Settings page.
- IMAGE_TOO_LARGE
- The image exceeds the maximum width, height, and file size.
- INACTIVE_OWNER_OR_USER
- The owner of the specified item is an inactive user. To reference this item, either reactivate the owner or reassign ownership to another active user.
- INSERT_UPDATE_DELETE_NOT_ALLOWED_DURING_MAINTENANCE
- Starting with version 32.0, you can’t create, update, or delete data while the instance where your org resides is being upgraded to the latest release. Try again after the release has completed. For release schedules, see trust.salesforce.com. Before version 32.0, the code is INVALID_READ_ONLY_USER_DML.
- INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
- An operation affects an object that is cross-referenced by the specified object, but the logged-in user doesn’t have sufficient permissions on the cross-referenced object. For example, a logged-in user attempts to modify an account record, and the update creates a ProcessInstanceWorkitem. If the user doesn’t have permission to approve, reject, or reassign the ProcessInstanceWorkitem, this exception occurs.
- INSUFFICIENT_ACCESS_OR_READONLY
- You can’t perform the specified action because you don’t have sufficient permissions.
- INVALID_ACCESS_LEVEL
- You can’t define a new sharing rule that provides less access than the specified org-wide default.
- INVALID_ARGUMENT_TYPE
- You supplied an argument that is of the wrong type for the operation being attempted.
- INVALID_ASSIGNEE_TYPE
- You specified an assignee type that is not a valid integer between one and six.
- INVALID_ASSIGNMENT_RULE
- You specified an assignment rule that is invalid or that isn’t defined in the org.
- INVALID_BATCH_OPERATION
- The specified batch operation is invalid.
- INVALID_CONTENT_TYPE
- The outgoing email has anEmailFileAttachment with an invalidcontentType property. See RFC2045 - Internet Message Format.
- INVALID_CREDIT_CARD_INFO
- The specified credit card information is not valid.
- INVALID_CROSS_REFERENCE_KEY
- The specified value in a relationship field is not valid, or data is not of the expected type.
- INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD
- The specified cross-reference type is not valid for the specified field.
- INVALID_CURRENCY_CONV_RATE
- Specify a positive, non-zero value for the currency conversion rate.
- INVALID_CURRENCY_CORP_RATE
- You can’t modify the corporate currency conversion rate.
- INVALID_CURRENCY_ISO
- The specified currency ISO code is not valid.
- INVALID_EMAIL_ADDRESS
- A specified email address is invalid.
- INVALID_EMPTY_KEY_OWNER
- You can't set the value for owner to null.
- INVALID_EVENT_SUBSCRIPTION
- Invalid parameters were specified when subscribing to an event.
- INVALID_FIELD
- You specified an invalid field name when trying to update or upsert a record.
- INVALID_FIELD_FOR_INSERT_UPDATE
- You can't combine a person account record type change with any other field update.
- INVALID_FIELD_WHEN_USING_TEMPLATE
- You can't use an email template with an invalid field name.
- INVALID_FILTER_ACTION
- The specified filter action can't be used with the specified object. For example, an alert is not a valid filter action for a Task.
- INVALID_ID_FIELD
- The specified ID field (ID, ownerId), or cross-reference field is invalid.
- INVALID_INET_ADDRESS
- A specified Inet address is not valid.
- INVALID_LINEITEM_CLONE_STATE
- You can’t clone a Pricebook2 or PricebookEntry record that isn’t active.
- INVALID_MASTER_OR_TRANSLATED_SOLUTION
- The solution is invalid. For example, this exception occurs if you try to associate a translated solution with a master solution that’s associated with another translated solution.
- INVALID_MESSAGE_ID_REFERENCE
- The outgoing email's References or In-Reply-To fields are invalid. These fields must contain valid Message-IDs. See RFC2822 - Internet Message Format.
- INVALID_OPERATION
- There is no applicable approval process for the specified object.
- INVALID_OPERATOR
- The specified operator is not applicable for the field type when used as a workflow filter.
- INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST
- You specified an invalid or null value for a restricted picklist.
- INVALID_PARTNER_NETWORK_STATUS
- The specified partner network status is invalid for the specified template field.
- INVALID_PERSON_ACCOUNT_OPERATION
- You can't delete a person account.
- INVALID_READ_ONLY_USER_DML
- Version 31.0 and earlier: You can’t create, update, or delete data while the instance where your org resides is being upgraded to the latest release. Try again after the release has completed. For release schedules, see trust.salesforce.com. After version 31.0, the code is INSERT_UPDATE_DELETE_NOT_ALLOWED_DURING_MAINTENANCE.
- INVALID_SAVE_AS_ACTIVITY_FLAG
- Specify true or false for the saveAsActivity flag.
- INVALID_SESSION_ID
- The specified sessionId is malformed (incorrect length or format) or has expired. Log in again to start a new session.
- INVALID_STATUS
- The specified org status change is not valid.
- INVALID_TYPE
- The specified type is not valid for the specified object.
- INVALID_TYPE_FOR_OPERATION
- The specified type is not valid for the specified operation.
- INVALID_TYPE_ON_FIELD_IN_RECORD
- The specified value is not valid for the specified field's type.
- IP_RANGE_LIMIT_EXCEEDED
- The specified IP address is outside the IP range specified for the org.
- JIGSAW_IMPORT_LIMIT_EXCEEDED
- The number of records you attempted to purchase from Data.com exceeds your available record addition limit.
- LICENSE_LIMIT_EXCEEDED
- You have exceeded the number of licenses assigned to your org.
- LIGHT_PORTAL_USER_EXCEPTION
- You attempted an action with a customer portal that's not allowed. For example, trying to add the user to a case team.
- LIMIT_EXCEEDED
- You have exceeded a limit on a field size or value, license, platform event publishing, or other component.
- LOGIN_CHALLENGE_ISSUED
- An email containing a security token was sent to the user’s email address because the user logged in from an untrusted IP address. The user can’t log in until tthe security token is added to the end of the password.
- LOGIN_CHALLENGE_PENDING
- The user logged in from an untrusted IP address, but a security token has not yet been issued.
- LOGIN_MUST_USE_SECURITY_TOKEN
- The user must add a security token to the end of the password to log in.
- MALFORMED_ID
- An ID must be either 15 characters, or 18 characters with a valid case-insensitive extension. There is also an exception code of the same name.
- MANAGER_NOT_DEFINED
- A manager has not been defined for the specified approval process.
- MASSMAIL_RETRY_LIMIT_EXCEEDED
- A mass mail retry failed because your org has exceeded its mass mail retry limit.
- MASS_MAIL_LIMIT_EXCEEDED
- The org has exceeded its daily limit for mass email. Mass email messages can't be sent again until the next day.
- MAXIMUM_CCEMAILS_EXCEEDED
- You have exceeded the maximum number of specified CC addresses in a workflow email alert.
- MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED
- You have exceeded the document size limit for a dashboard.
- MAXIMUM_HIERARCHY_LEVELS_REACHED
- You have reached the maximum number of levels in a hierarchy.
- MAXIMUM_SIZE_OF_ATTACHMENT
- You have exceeded the maximum size of an attachment.
- MAXIMUM_SIZE_OF_DOCUMENT
- You have exceeded the maximum size of a document.
- MAX_ACTIONS_PER_RULE_EXCEEDED
- You have exceeded the maximum number of actions per rule.
- MAX_ACTIVE_RULES_EXCEEDED
- You have exceeded the maximum number of active rules.
- MAX_APPROVAL_STEPS_EXCEEDED
- You have exceeded the maximum number of approval steps for an approval process.
- MAX_FORMULAS_PER_RULE_EXCEEDED
- You have exceeded the maximum number of formulas per rule.
- MAX_RULES_EXCEEDED
- You have exceeded the maximum number of rules for an object.
- MAX_RULE_ENTRIES_EXCEEDED
- You have exceeded the maximum number of entries for a rule.
- MAX_TASK_DESCRIPTION_EXCEEDED
- The task description is too long.
- MAX_TM_RULES_EXCEEDED
- You have exceeded the maximum number of rules per Territory.
- MAX_TM_RULE_ITEMS_EXCEEDED
- You have exceeded the maximum number of rule criteria per rule for a Territory.
- MERGE_FAILED
- A merge operation failed.
- MISSING_ARGUMENT
- You did not specify a required argument.
- NONUNIQUE_SHIPPING_ADDRESS
- You can't insert a reduction order item if the original order shipping address is different from the shipping address of other items in the reduction order.
- NO_APPLICABLE_PROCESS
- A process() request failed because the record submitted does not satisfy the entry criteria of any active approval processes for which the user has permission.
- NO_ATTACHMENT_PERMISSION
- Your org does not permit email attachments.
- NO_INACTIVE_DIVISION_MEMBERS
- You can't add members to an inactive Division.
- NO_MASS_MAIL_PERMISSION
- You don’t have permission to send the email. You must have “Mass Email” to send mass mail or “Send Email” to send individual email.
- NUMBER_OUTSIDE_VALID_RANGE
- The number specified is outside the valid range of values.
- NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED
- The number of history fields specified for the sObject exceeds the allowed limit.
- OP_WITH_INVALID_USER_TYPE_EXCEPTION
- The operation you attempted can't be performed for one or more users. For example, you can't add high-volume portal users to a group.
- OPTED_OUT_OF_MASS_MAIL
- An email can't be sent because the specified User has opted out of mass mail.
- PACKAGE_LICENSE_REQUIRED
- The logged-in user can’t access an object that is in a licensed package without a license for the package.
- PLATFORM_EVENT_ENCRYPTION_ERROR
- The platform event messages could not be published due to a problem with encryption. A misconfiguration in your Salesforce org or a general encryption service error can cause this problem.
- PLATFORM_EVENT_PUBLISHING_UNAVAILABLE
- Publishing platform event messages failed due to a service being temporarily unavailable. Try again later.
- PLATFORM_EVENT_PUBLISH_FAILED
- The platform event message could not be published after one or more attempts because of a system error. Try again later.
- PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT
- A create User operation failed because you can't create a second portal user under a Contact.
- PRIVATE_CONTACT_ON_ASSET
- You can’t have a private contact on an asset.
- RECORD_IN_USE_BY_WORKFLOW
- You can’t access a record that’s in use by a workflow or approval process.
- REQUEST_RUNNING_TOO_LONG
- A request that has been running too long is canceled.
- REQUIRED_FIELD_MISSING
- A call requires a field that was not specified.
- SELF_REFERENCE_FROM_TRIGGER
- You can't recursively update or delete the same object from an Apex trigger. This
error often occurs when:
- You try to update or delete an object from within its before trigger.
- You try to delete an object from within its after trigger.
This error occurs with both direct and indirect operations. The following is an example of an indirect operation:
- A request is submitted to update Object A.
- A before update trigger on object A creates an object B.
- Object A is updated.
- An after insert trigger on object B queries object A and updates it. This update is an indirect update of object A because of the before trigger of object A, so an error is generated.
- SHARE_NEEDED_FOR_CHILD_OWNER
- If a parent record has a child record that needs a sharing rule, you can’t delete the sharing rule for the parent record.
- SINGLE_EMAIL_LIMIT_EXCEEDED
- (API version 18.0 and later) The org has exceeded its daily limit for individual emails. Individual email messages can’t be sent again until the next day.
- STANDARD_PRICE_NOT_DEFINED
- Custom prices can't be defined without corresponding standard prices.
- STORAGE_LIMIT_EXCEEDED
- You have exceeded your org’s storage limit.
- STRING_TOO_LONG
- The specified string exceeds the maximum allowed length.
- TABSET_LIMIT_EXCEEDED
- You have exceeded the number of tabs allowed for a tabset.
- TEMPLATE_NOT_ACTIVE
- The template specified is unavailable. Specify another template or make the template available for use.
- TERRITORY_REALIGN_IN_PROGRESS
- An operation can't be performed because a territory realignment is in progress.
- TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET
- The specified text uses a character set that is not supported.
- TOO_MANY_APEX_REQUESTS
- Too many Apex requests have been sent. This error is transient. Resend your request after a short wait.
- TOO_MANY_ENUM_VALUE
- A request failed because too many values were passed in for a multi-select picklist. You can select a maximum of 100 values for a multi-select picklist.
- TRANSFER_REQUIRES_READ
- You can't assign the record to the specified User because the user does not have read permission.
- UNABLE_TO_LOCK_ROW
- A deadlock or timeout condition has been detected.
- A deadlock involves at least two transactions that are attempting to update overlapping sets of objects. If the transaction involves a summary field, the parent objects are locked, making these transactions especially prone to deadlocks. To debug, check your code for deadlocks and correct. Deadlocks are generally not the result of an issue with Salesforce operations.
- A timeout occurs when a transaction takes too long to complete, for example, when replacing a value in a picklist or changing a custom field definition. The timeout state is temporary. No corrective action is needed.
If an object in a batch can’t be locked, the entire batch fails with this error. Errors with this status code contain the IDs of the records that couldn’t be locked, when available, in the error message.
- UNAVAILABLE_RECORDTYPE_EXCEPTION
- The appropriate default record type could not be found.
- UNDELETE_FAILED
- An object could not be undeleted because it does not exist or has not been deleted.
- UNKNOWN_EXCEPTION
- The system encountered an internal error. Report this problem to Salesforce.
- UNSPECIFIED_EMAIL_ADDRESS
- The specified user does not have an email address.
- UNSUPPORTED_APEX_TRIGGER_OPERATION
- You can't save recurring events with an Apex trigger.
- UNVERIFIED_SENDER_ADDRESS
- A sendEmail() call attempted to use an unverified email address defined in the OrgWideEmailAddress object.
- WEBLINK_SIZE_LIMIT_EXCEEDED
- The size of a WebLink URL or JavaScript code exceeds the limit.
- WEBLINK_URL_INVALID
- The WebLink URL has failed the URL string validation check.
- WRONG_CONTROLLER_TYPE
- The controller type for your Visualforce email template does not match the object type being used.
If you receive a status code not listed in the previous table, contact Customer Support.
ExtendedErrorDetails
Reserved for future use. An ExtendedErrorDetails element contains extra detailed information about an error. The ExtendedErrorDetails element has the following properties.
| Name | Type | Description |
|---|---|---|
| extendedErrorCode | ExtendedErrorCode | A code that characterizes the extended error details. |
| extended error property | Varies | An extended error property that contains more information about the error. The property name and value vary based on the extended error code. |