From a60b96b71173ede570f2a98e4b44c34fb39f91f5 Mon Sep 17 00:00:00 2001 From: Shady Al Shoha <48188608+shadyshoha@users.noreply.github.com> Date: Tue, 28 Oct 2025 21:10:10 -0700 Subject: [PATCH] Salesforce: Make fieldsToUpdate optional in Update Record action Update the Salesforce Update Record action to make the fieldsToUpdate prop optional, allowing users to utilize the additionalFields prop immediately after selecting the SObject Type without needing to manually select fields first. Changes: - Made fieldsToUpdate prop optional in update-record.mjs - Updated additionalProps() to handle empty fieldsToUpdate gracefully - additionalFields now appears immediately after SObject Type selection This change maintains backward compatibility with existing workflows that use manual field selection while providing a more flexible workflow for users who prefer to specify all fields via additionalFields. --- .../actions/update-record/update-record.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/salesforce_rest_api/actions/update-record/update-record.mjs b/components/salesforce_rest_api/actions/update-record/update-record.mjs index 73c45117f595c..61ea4e9498d2a 100644 --- a/components/salesforce_rest_api/actions/update-record/update-record.mjs +++ b/components/salesforce_rest_api/actions/update-record/update-record.mjs @@ -44,6 +44,7 @@ export default { objType: c.sobjectType, }), ], + optional: true, reloadProps: true, }, }, @@ -57,8 +58,12 @@ export default { } = this; const fields = await this.salesforce.getFieldsForObjectType(sobjectType); - const selectedFields = fields.filter(({ name }) => fieldsToUpdate.includes(name)); - const selectedFieldProps = this.convertFieldsToProps(selectedFields); + // Only generate props for manually selected fields if any were selected + let selectedFieldProps = {}; + if (fieldsToUpdate && fieldsToUpdate.length > 0) { + const selectedFields = fields.filter(({ name }) => fieldsToUpdate.includes(name)); + selectedFieldProps = this.convertFieldsToProps(selectedFields); + } return { docsInfo: {