You need to sign in to do that
Don't have an account?
Maddy6161
Getting error on this code: contrllrww Compile Error: Entity is not org-accessible at line 1 column 21
public with sharing class contrllrww {
Public id Current_le_Id;
public Boolean isEdit { set; get;}
public List<Question__c> lstQuestion {set;get;}
public contrllrww (ApexPages.StandardController controller) {
Current_le_Id = controller.getRecord().id;
isEdit = false;
lstQuestion = New List<Question__c>();
for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
for(Question__c con:le.Question__c)
lstQuestion.add(con);
}
}
public void editProcess(){
isEdit = true;
}
public void save(){
if(lstQuestion.size() > 0){
upsert lstQuestion;
lstQuestion.clear();
}
for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
for(Question__c con:le.Question__c)
lstQuestion.add(con);
}
isEdit = false;
}
public void addQuestion(){
lstQuestion.add(new Question(leadId = Current_le_Id));
isEdit = true;
}
}
Public id Current_le_Id;
public Boolean isEdit { set; get;}
public List<Question__c> lstQuestion {set;get;}
public contrllrww (ApexPages.StandardController controller) {
Current_le_Id = controller.getRecord().id;
isEdit = false;
lstQuestion = New List<Question__c>();
for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
for(Question__c con:le.Question__c)
lstQuestion.add(con);
}
}
public void editProcess(){
isEdit = true;
}
public void save(){
if(lstQuestion.size() > 0){
upsert lstQuestion;
lstQuestion.clear();
}
for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
for(Question__c con:le.Question__c)
lstQuestion.add(con);
}
isEdit = false;
}
public void addQuestion(){
lstQuestion.add(new Question(leadId = Current_le_Id));
isEdit = true;
}
}
Rohit K Sethi
I had some minor typo in my program that led me to the same error. Not sure if it's the same case with you. I forgot to add __c when calling a custom object and got the same error. Hope this helps!