You need to sign in to do that
Don't have an account?
Agnibha Chakrabarti 10
Trigger in junction object
hi,
my requirement is
After the batch is over, Teacher will mark the batch as complete. Then the course will be moved from Requested Courses to Completed Coursed for all the students of the batch. Before marking a batch as complete, the teacher can remove any student from the batch. This will not be possible after the batch is completed.
Relationship:
im trying to access the students whose batch is completed(batch has a checkbox mark as complete or not)
I tried to access student in this way..it is showing error
my requirement is
After the batch is over, Teacher will mark the batch as complete. Then the course will be moved from Requested Courses to Completed Coursed for all the students of the batch. Before marking a batch as complete, the teacher can remove any student from the batch. This will not be possible after the batch is completed.
Relationship:
im trying to access the students whose batch is completed(batch has a checkbox mark as complete or not)
trigger Batch on Batch__c (before insert,after update) { List<String> b= new List<String>(); for(Batch__c p: Trigger.new){ b.add(p.Name); } List<Student__c> c=new List<Student__c>([select Student__r.Name from Student_Batch_Junction__c where Batch__r.Name in :b]); }
I tried to access student in this way..it is showing error
Please check below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
All Answers
Please check below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
Error is: Comparison arguments must be compatible types: String, List<Student_Batch_Junction__c>
This trigger has no error.........but it is not working