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

How to split a string value in apex and check the checkbox automatically
Hi All,
I am having a custom field "Demo" on my custom object. Below this custom object i am having 4 checkbox.
For Example: in the custom field has the value "Demo= IREAGL" means.
IR is splited than the checkbox IRON must be checked.
EA is splited than the checkbox EARTH must be checked.
GL is splited than the checkbox GLASS must be checked.
other check box must be left unchecked
One more thing this custom field value is upload using CSV file using apex code. I nedd split the split the test into 2 letter and corresponding value must be used to check the check box.
Kindly any one tell how to do this.
I hope you will able to write the steps.
thanks for the reply. Kindly tell me how to this. Pls explain me more.
if(customField.contains('IR')) {
//Mark IRON checkbox checked
}
if(customField.contains('EA')) {
}
if(customField.contains('GL')) {
}