Skip to content

Commit

Permalink
Fix salesagility#10382 - Fix issue with enum keys being used when set…
Browse files Browse the repository at this point in the history
…ting values

Update how enums fields are handled when setting workflow values
  • Loading branch information
JackBuchanan committed Mar 21, 2024
1 parent 8735575 commit 9f0ddb3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/AOW_Actions/actions/actionCreateRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ public function set_record(SugarBean $record, SugarBean $bean, $params = array()
$value = $bean->$fieldName;
}
break;
case 'enum':
if($record->field_defs[$field]["type"] === 'enum'){
//when setting enum field to another use key rather than label value
$value = $bean->$fieldName;
}else{
$value = $app_list_strings[$data["options"]][$bean->$fieldName];
}

default:
$value = $bean->$fieldName;
break;
Expand Down

0 comments on commit 9f0ddb3

Please sign in to comment.