From 4bff3af058917c8aee8d27599ffb866ff0e5b3a3 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Thu, 18 Mar 2021 05:53:39 -0400 Subject: [PATCH] :bug: Fix issue with firstname when creating/updating a lead (#1545) --- packages/nodes-base/nodes/Salesforce/Salesforce.node.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index f043c0fc94..031280d0b3 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -906,8 +906,8 @@ export class Salesforce implements INodeType { if (additionalFields.industry !== undefined) { body.Industry = additionalFields.industry as string; } - if (additionalFields.firstName !== undefined) { - body.FirstName = additionalFields.firstName as string; + if (additionalFields.firstname !== undefined) { + body.FirstName = additionalFields.firstname as string; } if (additionalFields.leadSource !== undefined) { body.LeadSource = additionalFields.leadSource as string; @@ -942,7 +942,6 @@ export class Salesforce implements INodeType { } } } - responseData = await salesforceApiRequest.call(this, 'POST', '/sobjects/lead', body); } //https://developer.salesforce.com/docs/api-explorer/sobject/Lead/patch-lead-id @@ -998,8 +997,8 @@ export class Salesforce implements INodeType { if (updateFields.industry !== undefined) { body.Industry = updateFields.industry as string; } - if (updateFields.firstName !== undefined) { - body.FirstName = updateFields.firstName as string; + if (updateFields.firstname !== undefined) { + body.FirstName = updateFields.firstname as string; } if (updateFields.leadSource !== undefined) { body.LeadSource = updateFields.leadSource as string;