lstQuestion.add(new ObjectB__c(ObjectA__cId = Current_obj_Id));
isEdit = true;
}
2 answers
Hi SumitPlease make small change in your code.public void addQuestion(){ lstQuestion.add(new ObjectB__c(ObjectBLookup__c = Current_obj_Id)); isEdit = true; } You are using wrong name for lookup. In ObjectB the lookup name for objectA is ObjectBLookup__c. And you are using ObjectA__cId instead of ObjectBLookup__cLet me know if it helps you out.Peace.