Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-update-record",
name: "Update Record",
description: "Update fields of a record. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm)",
version: "0.3.4",
version: "0.3.5",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand All @@ -23,7 +23,7 @@ export default {
"objectType",
],
description: "The type of object to update a record of.",

reloadProps: true,
},
recordId: {
propDefinition: [
Expand All @@ -44,6 +44,7 @@ export default {
objType: c.sobjectType,
}),
],
optional: true,
reloadProps: true,
},
},
Expand All @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion components/salesforce_rest_api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/salesforce_rest_api",
"version": "1.10.0",
"version": "1.10.1",
"description": "Pipedream Salesforce (REST API) Components",
"main": "salesforce_rest_api.app.mjs",
"keywords": [
Expand Down
Loading