mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 11:00:40 +08:00
Add support for saving relate fields
- Convert relate field nested object to legacy format - Properly map relate id fields to bean
This commit is contained in:
parent
bfed5ae78e
commit
9af33c927b
1 changed files with 9 additions and 2 deletions
|
@ -209,8 +209,15 @@ class RecordHandler extends LegacyHandler implements RecordProviderInterface
|
|||
|
||||
$type = $properties['type'] ?? '';
|
||||
|
||||
if ($type === 'relate') {
|
||||
continue;
|
||||
if ($type === 'relate' && isset($bean->field_defs[$field])) {
|
||||
|
||||
$idName = $bean->field_defs[$field]['id_name'] ?? '';
|
||||
|
||||
if ($idName !== $field) {
|
||||
$rName = $bean->field_defs[$field]['rname'] ?? '';
|
||||
$value = $values[$field][$rName] ?? '';;
|
||||
$values[$field] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($properties['isMultiSelect']) || $type === 'multienum') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue