Skip to content

Commit

Permalink
Fix for a bug in setting lookup relationship field's attributes
Browse files Browse the repository at this point in the history
lookup relationship field's attributes such as isCreateable and isUpdateable should be based on child object's lookup field, not the parent object's isLookup field.
  • Loading branch information
ashitsalesforce committed Oct 13, 2023
1 parent 75c81bd commit 6663503
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ private Map<String, Field> saveExtIdData() {
String childFieldLabel = childField.getLabel();
String[] childFieldLabelParts = childFieldLabel.split(" \\(.+\\)$");
relatedField.setLabel(childFieldLabelParts[0] + " (" + parentField.getLabel() + ")");
relatedField.setCreateable(parentField.isCreateable());
relatedField.setUpdateable(parentField.isUpdateable());
relatedField.setCreateable(childField.isCreateable());
relatedField.setUpdateable(childField.isUpdateable());
relatedField.setType(FieldType.reference);
String[] refToArray = new String[1];
refToArray[0] = refObjectInfo.getParentObjectName();
Expand Down

0 comments on commit 6663503

Please sign in to comment.