You need to sign in to do that
Don't have an account?
Rakesh S
MISSING_ARGUMENT, Id not specified in an update call: []
Hi All,
executing this in anonymous block.
List<Log_book__c> lbc = [Select id,Subject__c, Level__c, Week__c,Student__c,Subjects_Registered__c from Log_Book__c];
List<Log_Book__c> needToUpdate=new List<Log_Book__c>();
for(Log_Book__c slws : lbc){
Log_Book__c c = new Log_Book__c();
String s1 = slws.Subject__c+':'+slws.Level__c+':'+slws.Week__c;
Subjects_Levels_and_Weeks__c slw1=Subjects_Levels_and_Weeks__c.getinstance(s1);
if(slw1!=null){
c.id = slws.id;
c.isExam__c=true;
c.Exam__c=slw1.Exam__c;
// c.Student__c=slws.Student__c;
// c.Subjects_Registered__c=slws.Subjects_Registered__c;
}
needToUpdate.add(c);
}
update needToUpdate;
getting error like MISSING_ARGUMENT, Id not specified in an update call: [].
Please let me know how i can resolve this problem.
thank you..
executing this in anonymous block.
List<Log_book__c> lbc = [Select id,Subject__c, Level__c, Week__c,Student__c,Subjects_Registered__c from Log_Book__c];
List<Log_Book__c> needToUpdate=new List<Log_Book__c>();
for(Log_Book__c slws : lbc){
Log_Book__c c = new Log_Book__c();
String s1 = slws.Subject__c+':'+slws.Level__c+':'+slws.Week__c;
Subjects_Levels_and_Weeks__c slw1=Subjects_Levels_and_Weeks__c.getinstance(s1);
if(slw1!=null){
c.id = slws.id;
c.isExam__c=true;
c.Exam__c=slw1.Exam__c;
// c.Student__c=slws.Student__c;
// c.Subjects_Registered__c=slws.Subjects_Registered__c;
}
needToUpdate.add(c);
}
update needToUpdate;
getting error like MISSING_ARGUMENT, Id not specified in an update call: [].
Please let me know how i can resolve this problem.
thank you..
Can you provide more details on this - What is the relationship between Subjects_Levels_and_Weeks__c and Log_book__c?
Thanks,
Shyama
Please try below code. I hope that will help you
Example 1:- Example 2
Please let us know if this will help u
Thanks
Amit Chaudhary