mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Add upsert operation to various resources (Salesforce) (#1743)
* ⚡ Add upsert operation to various resources (Salesforce) The operation was added to the resources: Contact, Account, Lead, Opportunity and Custom Object. * ⚡ Rename operation create/update to Create or Update * ⚡ Improvements Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -20,6 +20,11 @@ export const customObjectOperations = [
|
||||
value: 'create',
|
||||
description: 'Create a custom object record',
|
||||
},
|
||||
{
|
||||
name: 'Create or Update',
|
||||
value: 'upsert',
|
||||
description: 'Create a new record, or update the current one if it already exists (upsert)',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
@@ -67,11 +72,54 @@ export const customObjectFields = [
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Name of the custom object.',
|
||||
},
|
||||
{
|
||||
displayName: 'Match Against',
|
||||
name: 'externalId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getExternalIdFields',
|
||||
loadOptionsDependsOn: [
|
||||
'customObject',
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customObject',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The field to check to see if the object already exists`,
|
||||
},
|
||||
{
|
||||
displayName: 'Value to Match',
|
||||
name: 'externalIdValue',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'customObject',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `If this value exists in the 'match against' field, update the object. Otherwise create a new one`,
|
||||
},
|
||||
{
|
||||
displayName: 'Fields',
|
||||
name: 'customFieldsUi',
|
||||
@@ -87,6 +135,7 @@ export const customObjectFields = [
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user