feat(Salesforce Node): Add fax field to lead option (#7030)

Closes:
https://community.n8n.io/t/there-is-no-fax-field-in-the-saleforce-lead-cretion/29829
This commit is contained in:
MC Naveen 2023-09-07 12:37:37 +05:30 committed by GitHub
parent 9af626a1b3
commit 01f875a94d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 0 deletions

View file

@ -228,6 +228,13 @@ export const leadFields: INodeProperties[] = [
default: '', default: '',
description: 'Email address for the lead', description: 'Email address for the lead',
}, },
{
displayName: 'Fax',
name: 'fax',
type: 'number',
default: '',
description: 'Fax number of the lead',
},
{ {
displayName: 'First Name', displayName: 'First Name',
name: 'firstname', name: 'firstname',
@ -243,6 +250,14 @@ export const leadFields: INodeProperties[] = [
description: description:
'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.', 'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
}, },
{
displayName: 'Has Opted Out of Fax',
name: 'hasOptedOutOfFax',
type: 'boolean',
default: false,
description:
'Whether the lead doesnt want to receive fax from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{ {
displayName: 'Industry', displayName: 'Industry',
name: 'industry', name: 'industry',
@ -497,6 +512,13 @@ export const leadFields: INodeProperties[] = [
default: '', default: '',
description: 'Email address for the lead', description: 'Email address for the lead',
}, },
{
displayName: 'Fax',
name: 'fax',
type: 'number',
default: '',
description: 'Fax Number of the lead',
},
{ {
displayName: 'First Name', displayName: 'First Name',
name: 'firstname', name: 'firstname',
@ -512,6 +534,14 @@ export const leadFields: INodeProperties[] = [
description: description:
'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.', 'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
}, },
{
displayName: 'Has Opted Out of Fax',
name: 'HasOptedOutOfFax',
type: 'boolean',
default: false,
description:
'Whether the lead doesnt want to receive fax from Salesforce (true) or does (false). Label is Fax Opt Out.',
},
{ {
displayName: 'Industry', displayName: 'Industry',
name: 'industry', name: 'industry',

View file

@ -3,6 +3,7 @@ export interface ILead {
Company?: string; Company?: string;
LastName?: string; LastName?: string;
Email?: string; Email?: string;
Fax?: number;
City?: string; City?: string;
Phone?: string; Phone?: string;
State?: string; State?: string;
@ -25,4 +26,5 @@ export interface ILead {
NumberOfEmployees?: number; NumberOfEmployees?: number;
MobilePhone?: string; MobilePhone?: string;
HasOptedOutOfEmail?: boolean; HasOptedOutOfEmail?: boolean;
HasOptedOutOfFax?: boolean;
} }

View file

@ -1084,6 +1084,9 @@ export class Salesforce implements INodeType {
if (additionalFields.hasOptedOutOfEmail !== undefined) { if (additionalFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = additionalFields.hasOptedOutOfEmail as boolean; body.HasOptedOutOfEmail = additionalFields.hasOptedOutOfEmail as boolean;
} }
if (additionalFields.hasOptedOutOfFax !== undefined) {
body.HasOptedOutOfFax = additionalFields.hasOptedOutOfFax as boolean;
}
if (additionalFields.email !== undefined) { if (additionalFields.email !== undefined) {
body.Email = additionalFields.email as string; body.Email = additionalFields.email as string;
} }
@ -1123,6 +1126,9 @@ export class Salesforce implements INodeType {
if (additionalFields.industry !== undefined) { if (additionalFields.industry !== undefined) {
body.Industry = additionalFields.industry as string; body.Industry = additionalFields.industry as string;
} }
if (additionalFields.fax !== undefined) {
body.Fax = additionalFields.fax as number;
}
if (additionalFields.firstname !== undefined) { if (additionalFields.firstname !== undefined) {
body.FirstName = additionalFields.firstname as string; body.FirstName = additionalFields.firstname as string;
} }
@ -1190,6 +1196,9 @@ export class Salesforce implements INodeType {
if (updateFields.hasOptedOutOfEmail !== undefined) { if (updateFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = updateFields.hasOptedOutOfEmail as boolean; body.HasOptedOutOfEmail = updateFields.hasOptedOutOfEmail as boolean;
} }
if (updateFields.hasOptedOutOfFax !== undefined) {
body.hasOptedOutOfFax = updateFields.hasOptedOutOfFax as boolean;
}
if (updateFields.lastname !== undefined) { if (updateFields.lastname !== undefined) {
body.LastName = updateFields.lastname as string; body.LastName = updateFields.lastname as string;
} }
@ -1238,6 +1247,9 @@ export class Salesforce implements INodeType {
if (updateFields.firstname !== undefined) { if (updateFields.firstname !== undefined) {
body.FirstName = updateFields.firstname as string; body.FirstName = updateFields.firstname as string;
} }
if (updateFields.fax !== undefined) {
body.Fax = updateFields.fax as number;
}
if (updateFields.leadSource !== undefined) { if (updateFields.leadSource !== undefined) {
body.LeadSource = updateFields.leadSource as string; body.LeadSource = updateFields.leadSource as string;
} }