Create a Salesforce Entity (obsolete)
Audience:
Low-code EngineersSkill 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.
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.
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
- Understand or maintain an existing application that already uses it
- Migrate an existing action to Create a Salesforce Entity
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.
Related Actions
| Action Name | Description |
|---|---|
| Create a Salesforce Entity | The current version, which signs in with a Salesforce connector. |
| Add Salesforce Connector | Creates a Salesforce connector. |
| Test Connector | Checks 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
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Salesforce Login URL | The 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. | Yes | empty string | No |
| Salesforce Username | The Salesforce username. | Yes | empty string | Yes |
| Salesforce Password | The Salesforce password. | Yes | empty string | Yes |
| Salesforce Security Token | The Salesforce security token for the user. | Yes | empty string | Yes |
| Salesforce Entity Type | The 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. | Yes | none | Yes |
| Salesforce Assignment Rule Name | Meant to name the assignment rule for Lead and Case. In 1.28 it has no effect. See Considerations. | Yes | empty string | No |
| Fields | The 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. | Yes | empty | Yes |
| Output Entity's ID Token Name | The name of a token to save the new record's ID in, for example LeadId. Brackets are optional. | No | empty string | No |
| Output Entity's URL Token Name | The name of a token to save a link to the new record in. See Output Parameters Reference. | No | empty string | No |
| On Error | Actions to run when the action fails. The [ErrorMessage] token holds the error message. | No | empty | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
[<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
- Create a Salesforce connector with the same login details, on the Connectors page (see Connectors) or with Add Salesforce Connector.
- Check it with Test Connector.
- 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 URL | Login Url on the connector |
| Salesforce Username | Account Username on the connector |
| Salesforce Password | Password on the connector |
| Salesforce Security Token | Security Token on the connector |
| (none) | Connector: pick the new connector |
| Salesforce Entity Type | Salesforce Entity Type |
| Salesforce Assignment Rule Name | Salesforce Assignment Rule Name. It takes effect in the new action, so check that the rule is the one you want. |
| Fields | Fields |
| Output Entity's ID Token Name | Output Entity's ID Token Name |
| Output Entity's URL Token Name | Output Entity's URL Token Name. The link is built from the connector's Login Url. |
| On Error | On 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
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