From 3cb8cd115e3287d2b1599faab62bb417350a1e8c Mon Sep 17 00:00:00 2001 From: Craig McElroy Date: Wed, 17 Mar 2021 14:17:21 -0500 Subject: [PATCH] Salesforce Custom Object Get All : Fix TypeError: options.fields.split is not a function --- packages/nodes-base/nodes/Salesforce/GenericFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts index dee94afbb6..c01af004b8 100644 --- a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts @@ -163,7 +163,7 @@ export function getDefaultFields(sobject: string) { export function getQuery(options: IDataObject, sobject: string, returnAll: boolean, limit = 0) { const fields: string[] = []; if (options.fields) { - fields.push.apply(fields, (options.fields as string).split(',')); + fields.push.apply(fields, options.fields.toString().split(',')); } else { fields.push.apply(fields, (getDefaultFields(sobject) as string || 'id').split(',')); }