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

Displaying Relational field on Custom Object detail page

Hello Everyone,


I have created a relationship in between Case and my Custom Object ( CR_Reply). So CR_Reply have relational field rCase__r.


Now what I'm trying to do :


I have created a Visualforce page, on which I have added Custom Object ( CR_Reply ) fields. On this page I have passed CaseID as querystring Parameter.


I just want to display read-only details of Case i.e. Case # and Subject on top of this Custom Object page.


Please let me know if anybody have done similar work before.





Hey GaneshD,

Having a bit of trouble understanding exactly how the page is structured (if you could post your code, that would be helpful). What is the controller for this visualforce page? If you use the standard controller for your custom object (e.g. standardController="CR_Reply__c") then you can simply use the relationship to to display the fields and the controller should query all necessary fields for you.


Assuming you DO use the CR_Reply__c standard controller, you would access the fields like this...




Does this help?