I have a relationship like this:
Class Student Lookup on Student
Contact Student Master-Detail on Student
I want to create a visualforce page to create new Class and on the same page add Student to the class.
I created a controller extension of Class's controller.
I am now stuck on adding student for the class.
I have several requirements here:
1.I want to add a lookup field to add student to the class.
(However, I'm on the parent object and how can I add this lookup field?)
2.I want to be able to create new student on the page.
Is there a way to do this?
3.I want to be able to add students by importing a file containing student ids.
Is there a way to do this?
Appreciated!
Best Answer
You are not able to add students as you are using a master detail relationship on student with contact. So for adding a student u should also add the contact id in the master detail relationship of contact.
Example.