You need to sign in to do that
Don't have an account?

Populate a specific field based on Custom Setting
I am trying to do something in Apex that I think is possible, but I cannot quite grasp how.
I have a parent object that has 5 fields.
Field_1__c
Field_2__c
Field_3__c
Field_4__c
Field_5__c
These five fields can be populated by "Red", "Yellow" or "Green".
The child object has a picklist where the values are the name of the five fields.
Picklist__c:
Field 1
Field 2
Field 3
Field 4
Field 5
If the picklist is not null and one of the field names are selected(with other logic to determine color), I need to populate the corresponding field with the appropriate value.
I know somehow this can be accomplished through Dynamic SOQL, but am at a loss at this point.
Please help.
Why not just use a regular workflow with field update