Many calls in the API use the following data types:
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:
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 run-time error, you can specify that field name in fieldsToNull. Similarly, if you need to set a picklist value to none when creating a record, but the picklist has a default value, you can 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. |
The following table lists the API fault elements that the API returns if an error occurs when processing a service request.
| 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(), create(), update(), retrieve(), or query() call. |
| InvalidFieldFault | An invalid field in a retrieve() or query() 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. |
The following list of ExceptionCode values is defined in your WSDL file. Some codes may not be in your WSDL, depending on the features you have enabled.
Codes may refer to features with which you are unfamiliar. If this is the case, you can find out more about the feature in the Salesforce online help.
If an organization does not have the CTI feature enabled, FUNCTIONALITY_NOT_ENABLED is returned instead.
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 organization (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. |
The following table lists API status codes that are returned with an error. Some codes may not be in your WSDL, depending on the features you have enabled.
Codes may refer to features with which you are unfamiliar. If this is the case, you can find out more about the feature in the Salesforce online help.
This error occurs with both direct and indirect operations. The following is an example of an indirect operation:
If an object in a batch cannot be locked, the entire batch fails with this error.
If you receive a status code not listed in the previous table, contact Customer Support.