You need to sign in to do that
Don't have an account?
Edwin Herrera
Display content different from the value
I am pulling fields from a database to my object on salesforce. one of the fields from the database are ID"s each ID represents a color such as ID 1111 is color green and 2222 is color yellow. The database does not have the actual color fields just the id for the color. How can I pull the ID's from the database but display Green, Yellow, or Red as the value on salesforce?
If there are any other ideas I would always try those as well.
I would like to display in a visualforce page. The object api is Work_Item__c. The fields api are; Budget_Health__c, Schedule_Health__c, Overall_Health__c, and Quality_Scope_Health__c. These color ids would be pulled from the database and converted to an actual color. I would also like these fields to be editable between the different colors on the visual force page if possible. The colors are Blank, Green, Yellow, and Red. I only need the word displayed not the actual color.
Map<Integer, String> colorIndex = new Map<Integer,String>();
colorIndex.put(557,'Blank')
colorIndex.put(558,'Green')
colorIndex.put(559,'Yellow')
colorIndex.put(560,'Red')
Also if I want all the values translated when the page is loaded where on the controller would I place this map or method?