Skip to main content
Version: 1.28 (Current)

Create a Salesforce Entity (obsolete)

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens

Creates a new record in Salesforce, for example a lead, a case, a contact or an account. This older version stores the Salesforce username, password and security token in the action itself.

caution

This action is obsolete. Use Create a Salesforce Entity with a Salesforce connector instead. The connector keeps the login details in one place, with the password and security token saved encrypted. Existing actions still work, but new applications shouldn't use this one. See Migrating to Create a Salesforce Entity.

note

This action is part of the Salesforce add-on (DnnSharp.Salesforce). The add-on is installed separately and needs the SALESFORCE feature in your license. If it isn't licensed, the action fails with a "not licensed" error. If you don't see the Salesforce actions, the add-on isn't installed.

Apart from how it signs in and the assignment rule difference below, this action works like Create a Salesforce Entity. See that page for how it works, field values, errors and considerations.

Typical Use Cases​

Don't use it to​

  • Build anything new. Use Create a Salesforce Entity with a Salesforce connector.
  • Apply a specific assignment rule by name. In this version the rule isn't sent to Salesforce. See Considerations.
  • Change or upsert a record that already exists. The action only inserts new records.
Action NameDescription
Create a Salesforce EntityThe current version, which signs in with a Salesforce connector.
Add Salesforce ConnectorCreates a Salesforce connector.
Test ConnectorChecks that a connector can sign in.
Run SOQL Query (obsolete)Runs a SOQL query, with the login details in the action.
Add to campaign (obsolete)Adds a lead to campaigns, with the login details in the action.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Salesforce Login URLThe Salesforce login domain, for example https://test.salesforce.com for a sandbox. If the value doesn't end with /services/oauth2/token, that path is added. Leave it empty to use https://login.salesforce.com/services/oauth2/token.Yesempty stringNo
Salesforce UsernameThe Salesforce username.Yesempty stringYes
Salesforce PasswordThe Salesforce password.Yesempty stringYes
Salesforce Security TokenThe Salesforce security token for the user.Yesempty stringYes
Salesforce Entity TypeThe Salesforce object to create a record of. The list has Lead, Case, Contact and Account. To use another object, switch to an expression and type its API name, for example Project__c.YesnoneYes
Salesforce Assignment Rule NameMeant to name the assignment rule for Lead and Case. In 1.28 it has no effect. See Considerations.Yesempty stringNo
FieldsThe fields to set. Salesforce Field is the field's API name, for example LastName. Value is the value to save, for example [LastName]. Both columns support tokens. See Field values.YesemptyYes
Output Entity's ID Token NameThe name of a token to save the new record's ID in, for example LeadId. Brackets are optional.Noempty stringNo
Output Entity's URL Token NameThe name of a token to save a link to the new record in. See Output Parameters Reference.Noempty stringNo
On ErrorActions to run when the action fails. The [ErrorMessage] token holds the error message.NoemptyNo

Output Parameters Reference​

ParameterDescription
[<Output Entity's ID Token Name>]The ID of the new record, an 18 character Salesforce ID. It's only set when Output Entity's ID Token Name has a value.
[<Output Entity's URL Token Name>]Salesforce Login URL, exactly as entered, followed by / and the new record's ID. It's only a working link when Salesforce Login URL is your Salesforce domain without a trailing / or the /services/oauth2/token path. If Salesforce Login URL is empty, it's just / and the ID.
[ErrorMessage]The error message, set when the action fails.

Migrating to Create a Salesforce Entity​

  1. Create a Salesforce connector with the same login details, on the Connectors page (see Connectors) or with Add Salesforce Connector.
  2. Check it with Test Connector.
  3. Replace each Create a Salesforce Entity (obsolete) action with a Create a Salesforce Entity action:
Create a Salesforce Entity (obsolete)Create a Salesforce Entity
Salesforce Login URLLogin Url on the connector
Salesforce UsernameAccount Username on the connector
Salesforce PasswordPassword on the connector
Salesforce Security TokenSecurity Token on the connector
(none)Connector: pick the new connector
Salesforce Entity TypeSalesforce Entity Type
Salesforce Assignment Rule NameSalesforce Assignment Rule Name. It takes effect in the new action, so check that the rule is the one you want.
FieldsFields
Output Entity's ID Token NameOutput Entity's ID Token Name
Output Entity's URL Token NameOutput Entity's URL Token Name. The link is built from the connector's Login Url.
On ErrorOn Error

Considerations​

  • The login details live in the action. They're saved with the action's settings, so anyone who can edit or export the action has access to them. Move to a connector, or at least pass the values through tokens instead of typing them in.
  • Every action needs its own copy. When the password or token changes in Salesforce, you must update every action that has it. With a connector, you update it once.
  • The assignment rule name has no effect. The action looks up the rule, but in this version the rule isn't sent with the request. For Lead and Case, Salesforce's own default behavior applies. To apply a named rule, use Create a Salesforce Entity.
  • The other considerations are the same as for Create a Salesforce Entity: insert only, no duplicate check, and required fields depend on the object.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Create a lead from a contact form​

This action signs in with login details from tokens, creates a lead from form values and saves its ID in [LeadId]. For new work, use Create a Salesforce Entity instead.

{
"Title": "Create a Salesforce Entity (obsolete)",
"ActionType": "CreateAnEntity",
"Description": "Create the lead in Salesforce",
"Condition": "[Email] != \"\"",
"Parameters": {
"sforceLoginURL": "",
"sforceUserName": "[SalesforceUsername]",
"sforcePassword": "[SalesforcePassword]",
"sforceSecurityToken": "[SalesforceSecurityToken]",
"sforceEntityType": "lead",
"Fields": [
{ "name": "FirstName", "value": "[FirstName]" },
{ "name": "LastName", "value": "[LastName]" },
{ "name": "Company", "value": "[Company]" },
{ "name": "Email", "value": "[Email]" }
],
"SOQLEntityIDTokenName": "LeadId"
}
}

Revised 09/27/2026