You need to sign in to do that
Don't have an account?
Srini
Compile Error: expecting right curly bracket, found 'else' at line
Hi Everyone,
When we are executing my code we are getting compile error.code is mentioned below.Please check and let us know where we have made the mistakes in the Code.
When we are executing my code we are getting compile error.code is mentioned below.Please check and let us know where we have made the mistakes in the Code.
for(Opportunity ot : scope){
String Subject= (String)ot.get(Schema.OpenActivities.Description);
if(Subject!=Null){
for(OpenActivities OPA : ot.getSObjects('OpenActivities')){
alist.add(OPA.id);
}
else{
for(OpportunityTeamMembers optm: ot.getSObjects('OpportunityTeamMembers')){
Plist.add(optm.id);
}
}
}
}
Thanks in Advance
String Subject= (String)ot.get(Schema.OpenActivities.Description);
if(Subject!=Null){
for(OpenActivities OPA : ot.getSObjects('OpenActivities')){
alist.add(OPA.id);
}
else{
for(OpportunityTeamMembers optm: ot.getSObjects('OpportunityTeamMembers')){
Plist.add(optm.id);
}
}
}
}
Thanks in Advance
Try this. you miss placed in if condition curly brace
Thanks for the quick reply. Working fine but we are getting another error like " Invalid type: OpenActivities at line"
List<OpenActivities> alist=New List<OpenActivities>();
Is any another way to use list for OpenActivities? And why am getting this error.
please help us.
Thanks.
Sorry Mentioened wrong name..
@MSCB .
we are getting another error like " Invalid type: OpenActivities at line"
List<OpenActivities> alist=New List<OpenActivities>();
Is any another way to use list for OpenActivities? And why am getting this error.
please help us.