Salesforce Create All

The Salesforce Create All activity adds one or more new individual objects to the database of your organization.

General

On the General tab, establish a connection with the Salesforce.com server.

The following table lists the configurations on the General tab of the Salesforce Create 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.

Description

On the Description tab, enter a short description for the Salesforce Create All activity.

Input

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

The following table lists the input elements on the Input tab of the Salesforce Create 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.

create
batchSize Integer Optional. 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 created through a SOAP call.

The value must be set between 1 and 200. The default value is 200.

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

externalIdFieldName String Optional. This field is used when performing the retry operation. An internal upsert method is called to retry the operation. If this field is not specified when doing the retrying operation, an exception is thrown and the retrying operation is not performed.

It contains the name of the field defined as a key field in the sObject.

createSObjects Complex Each createSObjects includes the following element:
  • sObjects (A complex value): Required. The complex sObject can be type substituted by a complex element from Salesforce_Metadata.xsd, retrieved from Salesforce.com server.
    Note:
    • In this release, you can create up to 10 object types in one call. Right-click sObjects > Duplicate to add multiple object types.
    • You are not required to specify the Id field in the sObject.

      To create a new relationship between a newly created sObject (sObject A) and an existing sObject (sObject B), where the sObject A schema includes the sObject B schema, set the value of the key field in sObject B while creating sObject A. If you modify the values of the fields in sObject B within the sObject A schema, the original sObject B is not modified. The key field in sObject B within the sObject A schema is only used to link sObject A with the original sObject B.

create_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.
  • AssignmentRuleHeader
    • assignmentRuleId (A string value): the ID of a specific assignment rule to run for the case or lead. It can be an inactive assignment rule. The ID can be retrieved by querying an AssignmentRule object. If assignmentRuleId is specified, do not specify useDefaultRule. This element is ignored for accounts, because all territory assignment rules are applied.

      The case and the lead are two predefined Salesforce.com schema types. For more information about this two types, see Force.com Web Service API Developer's Guide.

    • useDefaultRule (A Boolean value): if the value is true for a case or a lead, the default (active) assignment rule is used for the case or the lead. If useDefaultRule is specified, do not specify assignmentRuleId and type an empty string in the assignmentRuleId field. If true for an account, all territory assignment rules are applied, and if false, no territory assignment rules are applied.
  • MruHeader
    • updateMru (A Boolean value): specifies whether to update the list of most recently used items (true) or not (false).
  • AllowFieldTruncationHeader
    • allowFieldTruncation (A Boolean value): specifies whether to truncate field values that are too long (true) or not (false).

      Default is false: no change in behavior. If a string or textarea value is too large, the operation fails and the fault code STRING_TOO_LONG is returned.

  • DisableFeedTrackingHeader
    • disableFeedTracking (A Boolean value): if it is set to true, the changes made in the current call are not tracked in feeds.

      The default is false.

  • StreamingEnabledHeader
    • streamingEnabled (A Boolean value): specifies whether you want to receive streaming notifications for changes to Salesforce data.
  • AllOrNoneHeader
    • allOrNone (A Boolean value): if allOrNone is set to true, any failed records in a call cause all changes for the call to be rolled back. Record changes are not committed unless all records are processed successfully.

      The default is false. Some records can be processed successfully while others are marked as failed in the call results.

      Note: When processing large amounts of data, the activity internally invokes several SOAP calls. However, this AllOrNoneHeader applies to each internal SOAP call individually. If allOrNone is set to true, only individual internal SOAP calls with failed records are rolled back. All the record changes of other calls are committed.
  • DuplicateRuleHeader
    • allowSave (A Boolean value): if allowSave is set to true, duplicate records are saved. If this value is set to false duplicate records are prevented from being saved.
    • includeRecordDetails (A Boolean value): if includeRecordDetails is set to true, fields and values for records detected as duplicates are retrieved. If this value is set to false, only record IDs for records detected as duplicates are retrieved.
    • runAsCurrentUser (A Boolean value): if runAsCurrentUser is set to true, sharing rules for the current user are enforced when duplicate rules run. If this value is set to false, sharing rules specified in the class for the request are used.
      Note: If no sharing rules are specified, Apex code runs in system context and sharing rules for the current user are not enforced.
  • LocaleOptions
    • language (A string value): specifies the language of the labels returned. The value must be a valid user locale (language and country), such as de_DE or en_GB. For more information about the locales, see Force.com Web Service API Developer's Guide.
  • DebuggingHeader
    • debugLevel (A string value): specifies the level of detail in the debug header.

      See Salesforce.com document Apex Developer’s Guide for detailed information.

      The response of the debugging information can be found in the SOAP message log. You might have to enable the debug role log to trace the debugging errors.

  • 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.
  • EmailHeader
    • triggerAutoResponseEmail (A Boolean value): specifies whether to trigger auto-response rules (true) or not (false), for leads and cases. In the Salesforce.com user interface, this email can be automatically triggered by a number of events, for example creating a case or resetting a user password.
    • triggerOtherEmail (A Boolean value): specifies whether to trigger email outside the organization (true) or not (false). In the Salesforce.com user interface, this email can be automatically triggered by creating, editing, or deleting a contact of a case.
    • triggerUserEmail (A Boolean value): specifies whether to trigger an email that is sent to users in the organization (true) or not (false). In the Salesforce user interface, this email can be automatically triggered by a number of events: resetting a password, creating a new user, adding comments to a case, creating a task, or modifying a task.

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 Create All activity:

Output Item Data Type Description
createAllResponse
result errors Complex If errors occur during the activity, an array of error objects with an error code and description is returned.
id String The ID of an sObject that you attempt to create.
success Boolean Indicates whether the Create activity has succeeded (true) or not (false).

Fault

On the Fault tab, you can find the error code and error message of the Salesforce Create 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 was not used or the Salesforce connection was not configured correctly.