I have two objects: 1)Projects 2)Consultant 3)Assignment(Junction between Project and Consultant)

Project to Consultant is having many to many relationship defined by Assignment object.

Now my requirement is suppose there is a project named "ABC". How do i create a new Consultant inside the Project page(from the Assignment related list). Now I am only able to see already existing consultants.

Does it require a code? Can you give me examples of code

1 Answer 1


Yes, this would require code. You can create a Visualforce page to imitate a related list and add that to the page layout for Project, but you'll have to write a moderately substantial amount of both Apex (for the controller) and Visualforce (for the page itself), as well as some configurational things such as a custom button and altering the page layout.

Here is one example. The difference between your case and this one is that you'll just have to add a button to create a new Consultant record to the page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .