You need to sign in to do that
Don't have an account?

trigger code for count operation
Hi, i want to write trigger code for the following requirement. i have two objects courses and students .
in course object i have two fields coursename and no of students. in student object i have Name and a lookup field (with course object). if a student select a course the no of student field count should be incresed.if i delete a student the count should be decresed.
in course object i have two fields coursename and no of students. in student object i have Name and a lookup field (with course object). if a student select a course the no of student field count should be incresed.if i delete a student the count should be decresed.
Try as below: