You need to sign in to do that
Don't have an account?
nilesh walke
i want a test class on it
public static void Validation(List<contact> con6){
// Opportunity opp= new opportunity();
for(contact con:con6){
for(opportunity oppt:[select id, name, amount from opportunity limit 10]){
if(oppt.Amount<5000 || Oppt.Amount==null){
oppt.Amount=5000;
oppt.name=oppt.Name +'KING';
}
else{
oppt.Amount=oppt.Amount+1000;
oppt.Name='Dr'+oppt.Name;
}
Update oppt;
}
}
// Opportunity opp= new opportunity();
for(contact con:con6){
for(opportunity oppt:[select id, name, amount from opportunity limit 10]){
if(oppt.Amount<5000 || Oppt.Amount==null){
oppt.Amount=5000;
oppt.name=oppt.Name +'KING';
}
else{
oppt.Amount=oppt.Amount+1000;
oppt.Name='Dr'+oppt.Name;
}
Update oppt;
}
}
Try Below Code Please Mark It As Best Answer If it Helps
Thank You!