Activity Forums Salesforce® Discussions Field value from custom object inside visualforce page

  • Field value from custom object inside visualforce page

    Posted by Nitish on April 30, 2016 at 6:16 PM

    I have a custom object called Placement that has a custom field in it called URL.

    I also created a visualforce page that displays an iframe. This page is displayed in my Portal as a child. I need to take the custom field, URL, from my parent object and display it as the src in my visualforce page.

    <apex:page StandardController=”Placement__c” sidebar=”false”>
    <apex:iframe src=”{!URL}”/>
    </apex:page>

    This is not working.

    • This discussion was modified 10 years, 1 month ago by  Forcetalks.
    • This discussion was modified 10 years, 1 month ago by  Forcetalks.
    • This discussion was modified 10 years ago by  Nitish.
    Surbhi replied 10 years ago 2 Members · 1 Reply
  • 1 Reply
  • Surbhi

    Member
    June 1, 2016 at 6:57 AM

    Hi Nitish,

    Please have a look on the below code:

    <apex:page StandardController=”Portal__c” sidebar=”false”>
    <apex:iframe src=”{!Portal__c.URL}”/>
    </apex:page>

    Thanks

Log In to reply.