a!sfcInsert() Function

Adds a new business object to Salesforce. For more information on what objects can be added, the permissions needed to add objects, and required and default values, refer to the Salesforce API documentation for the create operation.


a!sfcInsert( scsExternalSystemKey, usePerUserCredentials, endpoint, parameters)

Common Parameters:

scsExternalSystemKey: (Text) The key from the Third Party Credentials admin console page that corresponds to the set of credentials that should be used to authenticate.

usePerUserCredentials: (Boolean) If true the credentials set in the Third-Party Credentials settings page by the current user running the expression will be used. If false the site-wide credential values will be used.

endpoint: (Text) The Salesforce endpoint URL to use for authentication. Possible values are "https://login.salesforce.com/services/Soap/u/27.0", which is used for production and development environments, and "https://test.salesforce.com/services/Soap/u/27.0", which is used for the Salesforce "sandbox" test environment. Update the 27.0 portion of the endpoint URL to match the version of the API that you are accessing. As a best practice, create a constant for this value.

Specific Parameters:

parameters: (Any Type) The data to insert, given as a dictionary with the same field structure as the sObject to insert. Multiple objects can be inserted by providing a list of dictionaries. The dictionary structure is as follows:

{sObjectName: {
  {Attribute1_of_Object1: value1_of_Object1,  Attribute2_of_Object1: value2_of_Object1, …, AttributeN_of_Object1: valueN_of_Object1},
  {Attribute_of_Object2: value1_of_Object2,  Attribute2_of_Object2: value2_of_Object2, …, AttributeN_of_Object2: valueN_of_Object2},
  {Attribute1_of_ObjectN: value1_of_ObjectN,  Attribute2_of_ObjectN: value2_of_ObjectN, …, AttributeN_of_ObjectN: valueN_of_ObjectN}



This function returns a writer and must be used with the bind() function.

See also:


Insert a New Account

Copy and paste the expression into the Interface Designer, save it, then call the interface in a Tempo Report to test.

  local!sfcInsertWriter: bind(
      scsExternalSystemKey: cons!SALESFORCE_SCS_KEY,
      usePerUserCredentials: true,
      endpoint: cons!SALESFORCE_ENDPOINT,
      parameters: _
    firstColumnContents: {
        label: "New Account Name",
        value: local!accountName,
        saveInto: local!accountName
        label: "New Account Website",
        value: local!accountUrl,
        saveInto: local!accountUrl
        buttons: {
            label: "Create",
            value: {Account: {
              {Name: local!accountName, Website: local!accountUrl}
            saveInto: local!sfcInsertWriter

On This Page