Skip to content

Commit 1edf3ad

Browse files
committed
Change incorrect default customerKey in ContactPersonName field
1 parent 354eebe commit 1edf3ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/orchestrator-ui-components/src/components/WfoForms/formFields/ContactPersonNameField.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ function ContactPersonName({
8989
: name;
9090
const contactsField = useField(useFieldName, {}, { absoluteName: true })[0];
9191

92-
const customerFieldName =
93-
customerKey || contactsField.field.customerKey || 'customer';
92+
const customerIdFieldName =
93+
customerKey || contactsField.field.customerKey || 'customer_id';
9494

9595
// Get initial value for org field if it exists (we cant really test)
9696
let customerInitialValue;
9797
try {
98-
customerInitialValue = schema.getInitialValue(customerFieldName, {});
98+
customerInitialValue = schema.getInitialValue(customerIdFieldName, {});
9999
} catch {
100100
customerInitialValue = '';
101101
}
102102

103103
const customerIdValue =
104104
customerId ||
105105
contactsField.field.customerId ||
106-
get(model, customerFieldName, customerInitialValue);
106+
get(model, customerIdFieldName, customerInitialValue);
107107

108108
const [displayAutocomplete, setDisplayAutocomplete] = useState(false);
109109
const [contactPersons, setContactPersons] = useState<ContactPerson[]>([]);

0 commit comments

Comments
 (0)