You need to sign in to do that
Don't have an account?
Marie Kagay
Method to set proper case in text field
I have a text field on Opportunity Product that is updated via apex with the values of a multi-select picklist fields. A number of values from the multi-select picklist are all uppercase and at this time need to remain so.
However, we'd like the all uppercase values to be updated to proper case when the apex code brings them over to the text field. (I'm defining proper case and first letter of a word is upper case, the rest are lower case). Since the values are all seperated by semi-colons when updated in the text field, I would like to have this update run on every value separated by a semi-colon.
For example, if the multiselect picklist has values "JAPAN;CANADA;PERU", my current apex code updates my text field with "JAPAN;CANADA;PERU". Is there a method I could use that would update the text field to "Japan;Canada;Peru"?
Thanks!
However, we'd like the all uppercase values to be updated to proper case when the apex code brings them over to the text field. (I'm defining proper case and first letter of a word is upper case, the rest are lower case). Since the values are all seperated by semi-colons when updated in the text field, I would like to have this update run on every value separated by a semi-colon.
For example, if the multiselect picklist has values "JAPAN;CANADA;PERU", my current apex code updates my text field with "JAPAN;CANADA;PERU". Is there a method I could use that would update the text field to "Japan;Canada;Peru"?
Thanks!
Place below method in your controller & pass your picklist value in this method..
If this answers your question mark Best Answer it as solution and then hit Like!