Skip to main content
deleted 4 characters in body
Source Link
Benjamin Pirih
  • 2.4k
  • 20
  • 30

We would like to have a single visualforce page displays both the parent detail and child detail together. The idea here is to prevent the user from having to traverse from the child to the parent to see the record details.

Know we could have a single detail component which would display the child record using the standard controller. ( we could write custom apex controller to retrieve the parent record fields and display this on the visualforce page ) but it is possible to have two detail components on a single page for both the parent and child. In our example the parent record is very complex and subject to change so we do not wish to attempt to custom code this layout via visualforce and would like to leverage the detail component.

the code would looks something like this:

<apex:page standardController="AccountChild">
   <apex:detail subject="{!accountChild.NameId}" relatedList="false" />
   <apex:detail subject="{!account.NameId}" relatedList="false" /> 
</apex:page>

But I do not think this is possible as a detail component must be attached to a singular standardController object..

We would like to have a single visualforce page displays both the parent detail and child detail together. The idea here is to prevent the user from having to traverse from the child to the parent to see the record details.

Know we could have a single detail component which would display the child record using the standard controller. ( we could write custom apex controller to retrieve the parent record fields and display this on the visualforce page ) but it is possible to have two detail components on a single page for both the parent and child. In our example the parent record is very complex and subject to change so we do not wish to attempt to custom code this layout via visualforce and would like to leverage the detail component.

the code would looks something like this:

<apex:page standardController="AccountChild">
   <apex:detail subject="{!accountChild.Name}" relatedList="false" />
   <apex:detail subject="{!account.Name}" relatedList="false" /> 
</apex:page>

But I do not think this is possible as a detail component must be attached to a singular standardController object..

We would like to have a single visualforce page displays both the parent detail and child detail together. The idea here is to prevent the user from having to traverse from the child to the parent to see the record details.

Know we could have a single detail component which would display the child record using the standard controller. ( we could write custom apex controller to retrieve the parent record fields and display this on the visualforce page ) but it is possible to have two detail components on a single page for both the parent and child. In our example the parent record is very complex and subject to change so we do not wish to attempt to custom code this layout via visualforce and would like to leverage the detail component.

the code would looks something like this:

<apex:page standardController="AccountChild">
   <apex:detail subject="{!accountChild.Id}" relatedList="false" />
   <apex:detail subject="{!account.Id}" relatedList="false" /> 
</apex:page>

But I do not think this is possible as a detail component must be attached to a singular standardController object..

Source Link
Benjamin Pirih
  • 2.4k
  • 20
  • 30

Display both parent apex:detail component and child apex:detail on single visualforce page

We would like to have a single visualforce page displays both the parent detail and child detail together. The idea here is to prevent the user from having to traverse from the child to the parent to see the record details.

Know we could have a single detail component which would display the child record using the standard controller. ( we could write custom apex controller to retrieve the parent record fields and display this on the visualforce page ) but it is possible to have two detail components on a single page for both the parent and child. In our example the parent record is very complex and subject to change so we do not wish to attempt to custom code this layout via visualforce and would like to leverage the detail component.

the code would looks something like this:

<apex:page standardController="AccountChild">
   <apex:detail subject="{!accountChild.Name}" relatedList="false" />
   <apex:detail subject="{!account.Name}" relatedList="false" /> 
</apex:page>

But I do not think this is possible as a detail component must be attached to a singular standardController object..