You need to sign in to do that
Don't have an account?
Newbie_edm
Apex batch class to update lookup object
Dear Friends,
i got an requirement, I have teacher and student lookup relationships objects. Teacher object will have student related list, student related list will show student name and their total fees paid. I need to have custom field in Teacher object which will show total fees of all students uunder him.
i would like to use batch apex to update the total fees in Teached object based on student related list fees.
it would be great help if you could direct me to get the proper sample code.
Teacher Obect
Fee total ( Sum ( all students fees under this teacher))
Thanks in advance
i got an requirement, I have teacher and student lookup relationships objects. Teacher object will have student related list, student related list will show student name and their total fees paid. I need to have custom field in Teacher object which will show total fees of all students uunder him.
i would like to use batch apex to update the total fees in Teached object based on student related list fees.
it would be great help if you could direct me to get the proper sample code.
Teacher Obect
Fee total ( Sum ( all students fees under this teacher))
Thanks in advance
Please find your required code below:
Please take of the comments provided at the last of the class and also take care of any syntax error. Let me knwo in case you need any other help on this.
Thanks,
Abhishek Bansal.
All Answers
Please find your required code below:
Please take of the comments provided at the last of the class and also take care of any syntax error. Let me knwo in case you need any other help on this.
Thanks,
Abhishek Bansal.
Hi Venkat,
Please take some help from the link below to write your test class:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_test.htm
If this doesn't help then please open a new question for test class.
Thanks,
Abhishek Bansal.