I am currently trying to display a related object record based on a certain criteria, the current code I have is utilizing Iframe which isn't possible to use anymore since it's been patched.

Basically I have a field called relatedto__c which displays an ID to a different object if a certain criteria is met, if this criteria is met I'd like a visualforce page to display that relatedto record.

Here is my current attempt which I know isn't possible, but just to give you an idea of what I am trying to accomplish here:

`<apex:iframe src="http://na94.salesforce.com/{!RESTORE_Touch_Point__c.RelatedTo__c}?isdtp=vw" scrolling="true" id="theIframe"/>`

EDIT: So to give a better visual representation, I'd like this entire page to display on a Visualforce page on a different object:

enter image description here

  • 1
    Have you tried using <apex:detail> with the related record ID?
    – Matt Lacey
    Commented Feb 5, 2020 at 0:15
  • Yes, that did work. Thank you very much. Commented Feb 5, 2020 at 15:41

1 Answer 1


<apex:detail> might be your best/easiest option here. It won't put the whole page into your page, but it will put the record data with it's basic layout in, and it's one line. Just specify relatedto__c as the id parameter and you should be set.

You must log in to answer this question.

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