Insert Record Action

Estimated reading: 3 minutes 5 views

The Insert Record action allows you to dynamically create a new record in the Salesforce database. This action is useful for automating the insertion of records based on process logic and custom field values.

action detail

Key Features

  • Inserts records into any Salesforce object.
  • Allows specifying record types for precise control.
  • Supports additional input parameters for setting custom field values.

Configuring an Insert Record Action

When adding an Insert Record action, the following fields must be configured:

1. Common Properties

  • Label:
    • A user-friendly name for the action, displayed in the process flow.
    • Required field.
  • Name:
    • A unique identifier for the action, used internally.
    • Required field.

2. Inputs

The inputs section defines the parameters required to create the record. The following fields are available:

Required Fields

  1. SObject API Name:

    • Specifies the Salesforce object where the record will be created.
    • Examples: Account, Contact, CustomObject__c.
  2. Record Type Name:

    • Allows you to specify the record type for the new record.
    • Examples: Customer, Partner, Internal.

Additional Inputs

  1. fields.:

    • Enables you to set values for specific fields on the record being created.
    • Almost one input of this must ve added to the action
    • Examples:
    Name Type Value Comment
    fields.Type__c String Document Quality Check Sets the Type field with a string value.
    fields.ParentId__c String {recordId} Sets the Parent Id using the record ID that triggered the process.
    fields.Address__c String {nodes.GetAccount.GetAccount_Info.outputs.Account__r.Address__c} Uses the output of a previous action to set the Address.

To add additional inputs:

  • Use the Add New Property button.
  • Define the Name, Type, and Value for each field.

3. Outputs

  • The action returns the ID of the newly created record.
  • This ID can be used in subsequent steps within the process.

Usage Example

Scenario: Creating a New Account

  1. SObject API Name: Account.
  2. Record Type Name: Customer.
  3. Additional Inputs:
    • fields.Name: John Doe.
    • fields.BillingCity: San Francisco.
    • fields.Industry: Technology.

Steps:

  1. Add an Insert Record action to the process.
  2. Fill in the Label and Name fields.
  3. Specify the SObject API Name (Account) and Record Type Name (Customer).
  4. Add additional inputs to populate fields like Name, BillingCity, and Industry.
  5. Save the configuration and test the process.

Best Practices

  • Ensure the specified object and fields exist in your Salesforce org before using them.
  • Use clear and descriptive field names and values for easy identification and debugging.
  • Test the action in a sandbox environment to verify the correct record creation logic.
  • Leverage outputs to connect this action with subsequent steps dynamically.

Leave a Comment

       
Euphoria, forever till the end of times

Euphoria

Share this Doc

Insert Record Action

Or copy link

CONTENTS