Salesforce Query All

The Salesforce Query All activity performs the specified SOQL SELECT statement. It executes a query against the specified object and returns the data that matches the specified criteria.

General

On the General tab, you can establish a connection to the Salesforce.com server.

The following table lists the configurations on the General tab of the Salesforce Query All activity:

Field Module Property? Description
Name No The name displayed as the label of the activity in the process.
Salesforce Connection Yes The path to the Salesforce shared resource.

Click the Choose/Create Default Resource icon to select a usable connection for the activity.

Query Type Yes Select a query type from the drop-down list. The default type is Query. If you select Query from the drop-down list, the operation retrieves existing records only. If you select QueryAll, the operation retrieves all archived and deleted records. It can be provided using both module and process property.
Salesforce Query No Displays the query to be executed against the specified object. Click Query Builder to open the wizard to build your query or clear the existing query with Clear Query.

For more information about the query builder, see Salesforce Query Builder.

Prepared Statement No If you use a prepared parameter '?' in the query, then define the parameter name and its data type in the statement. You can add multiple prepared parameters using the add button.

Description

On the Description tab, you can enter a short description for the Salesforce Query All activity.

Input

On the Input tab, you can specify input values for the Salesforce Query All activity.

The following table lists the input elements on the Input tab of the Salesforce Query All activity:

Input Items Data Type Description
connectionInfo (All fields in this section are optional.)
serverUrl String The web address of the endpoint that is used by this operation.
sessionId String The unique ID associated with this session.
externalSessionIdUsed Boolean Specifies whether an external session ID is used (true) or not (false).

If the value is set to true, an external session ID is filled in the sessionId field.

In this case, when the session has to be refreshed, the refreshed operation cannot be performed, and an exception is thrown.

query (All fields in this section are optional.)
batchSize Integer When processing large amounts of data, the activity internally invokes several SOAP calls. This field is used to set the batch size for the number of records returned through an SOAP call.

The value must be set between 200 and 2000. The default value is 500.

If the input value equals -1, it is set to the default value. If the input value is greater than 2000, it is set to 2000. If the input value is less than 200 (except -1), it is set to 200.

queryMain Each queryMain includes the following element:
  • queryString (A string value): required. The query string follows SOQL syntax. It specifies the object to query, the fields to return, and any condition of including a specific object in the query.
fields This field is visible when you define a prepared parameter on the General tab. You can pass the prepared parameters values under the parameters.
query_Optional (All fields in this section are optional.)
_configData Each _configData includes the following element:
  • timeout (An integer value): the timeout value specifies the number of milliseconds an internal API call waits before the data returns.

    The default value is 15000 milliseconds.

    You can also change the default timeout value by setting the properties. See Default Timeout Value Setting for detailed information.

headers Each headers includes the following elements:
  • CallOptions
    • client (A string value): a string that identifies a particular client.
    • defaultNamespace (A string value): a string that identifies a developer namespace prefix. Use this field to resolve field names in managed packages without having to fully specify the fieldName everywhere.
  • MruHeader
    • updateMru (A Boolean value): specifies whether to update the list of most recently used items (true) or not (false), which is on the sidebar of the Salesforce.com user interface.
  • PackageVersionHeader
    Each PackageVersion includes the following elements:
    • majorNumber (An integer value): the major version number of a package version.

      A package version is denoted by majorNumber.minorNumber, for example 2.1.

    • minorNumber (An integer value): the minor version number of a package version.

      A package version is denoted by majorNumber.minorNumber, for example 2.1.

    • namespace (A string value): the unique namespace of the managed package.
SubsetSetting Each SubsetSetting includes the following elements:
  • ProcessInSubsets(A Boolean value): optional. Specifies whether you can process smaller batches of rows instead of retrieving one large result set (true) or not (false).

    This element must be used in conjunction with a Repeat loop scope to process the result sets. See Querying Data in Subset Mode for more information.

    The default value is false.

  • subsetSize (An integer value): optional. This element is only available when the ProcessInSubsets field is set to true. When that field is set to true, records are processed in batches. The returned data is passed out from the activity when completing the activity in a subsetSize sized batch.

    This element specifies the maximum number of messages that are picked up for each execution loop. Its region is from 1 to 10.

    You can process smaller batches of rows instead of retrieving one large result set by using this element. This element must be used in conjunction with a Repeat loop scope to process the result sets. See Querying Data in Subset Mode for more information.

    The default value is 1.

Output

On the Output tab, you can find the output value.

The following table lists the output elements on the Output tab of the Salesforce Query All activity:

Output Item Data Type Description
queryAllResponse
result done Boolean Indicates whether additional rows are to be retrieved from the query results (false) using another query activity, or not (true). Your client application can use this value as a loop condition when iterating through the query results.
queryLocator String Used in subsequent query activities for retrieving sets of objects from the query results, if applicable.
records Complex An array of sObjects representing individual objects of the specified object and containing data defined in the fieldlist specified in the queryString element.

These sObjects can be converted to the specified type defined in the metadata schema, for example, the Salesforce_Metadata, retrieved from the Salesforce.com server.

size Integer Total number of rows retrieved in the query. Your client application can use this value to determine whether the query retrieved any rows (size > 0) or not (size = 0).
lastSubset Boolean Indicates whether the current output is the last subset (true) or not (false).

Fault

On the Fault tab, you can find the error code and error message of the Salesforce Query All activity. See Error Codes for more information about error codes and corrective actions to take.

Fault Thrown when
SalesforceExecuteSOAPMethodException An error occurred when calling an SOAP method.

For example, wrong values are set in the Input fields or the Salesforce session has timed out.

SalesforceLoginException An error occurred when logging in to the Salesforce.com server.
SalesforceConnectionNotFoundException An error occurred when the external session ID is not used or the Salesforce connection is not configured correctly.