Managing a hierarchy of records

Salesforce records often form part of a deep and wide hierarchy; for example, an account can contain a number of cases, each of which can have a number of comments associated with them. Creating and maintaining the elements of the hierarchy in isolation is a cumbersome and time-consuming task, as to add a comment a user must click through from the account record to the case record, and then click on the New button on the case comments related list to open the new comment page.

In this recipe, we will create a Visualforce page that allows a user to maintain an account, its associated cases, and the comments associated with those cases. The user can update or delete existing records, or create new records at any level ...

Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.