Nope, a list is not helping here. It is a one to one relationship: If I only update primary_address_postalcode in contacts, only prmary_address_city needs to be populated. So when I call the logic in the vardefs, I just need to pass along which one is the right postalcode field.
I hope, you understand what I try to explain.
I already optimized the code by useing:
$options = $process->getOptions();
$module = $options['module'] ?? '';
if($module == 'accounts') {
$srcField = 'shipping_address_postalcode';
}
else {
$srcField = 'alt_address_postalcode';
}
$zip= $options['record']['attributes'][$srcField] ?? '';
in the handlers. So I donβt need to create a dedicated handler for accounts. I just need to figure out, how to pass the source field βsrcFieldβ as a parameter in the Vardefs instead of hardcodeing it in the handlers.