function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shail.sfdcshail.sfdc 

Hover functionality on Custom VF pages

Hello, 

 

Salesforce.com OOB object detail pages we have a hover functionality for related list on the top of the page. Can I take that component and use un my Custom Visualforce page somehow. For ex : I've a Shipment object which has a related list of line items. On my custom VF page I'm showing Total Line Item Quantity aon other things , on hover of which I want to show the Line Item related list. How can this be achieved

 

Thanks in advance for your help. 

Shail

 

sfdcfoxsfdcfox

If you use <apex:outputField> on a field that resolves to a lookup or master-detail field, you will get this functionality for free. You can try to hack it yourself by reconstructing the JavaScript, but such solutions may be fragile and break after a few releases. Alternatively, you might choose to build your own hover, which requires a hint of JavaScript, CSS, and HTML knowledge, plus a bit of information on some sort of query mechanism, such as a @RemoteAction function, a Web Services call, a REST call, or the Ajax Toolkit.