Skip to content
Merged
Changes from 1 commit
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 @@ -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