+ Start a Discussion
MaximeMaxime 

Set global variable dynamically

Hello,
 
global class test {
global String var1;
global String var2;
global String var3;
}

What i want to do is to set this variables dynamically like : 
 
for(List<String> value: values){
 test[value] = '1'; 
}

Where value is var1, var2, var3

Thanks
 
Best Answer chosen by Maxime
AnudeepAnudeep (Salesforce Developers) 
Hi Maxime - Similar question is posted here already. I recommend looking at the suggestions