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
Mauricio GiordanoMauricio Giordano 

How to create iframe component inside lead/contact pages

Hello, I have an API appexchange app that is already published and I wanted to add the option to embed our page inside the lead & contact details page. It would be a small block containing the lead details that we have in our database, so this component needs to send a GET or POST request to our embed url page containing the leadID / contactID somehow.

I never did any visual things on Salesforce, so I don't know if that would be a canvas app, lightining page, visualforce, etc. Some guides would be great!

 

Thank you.

Omar Rajab 94Omar Rajab 94
Hi Mauricio,
create a new Visualforce Page with the code below:
<apex:page showHeader=”false” standardController="Lead">
    <apex:pageBlock >
        <apex:iframe src=”https://www.salesforce.com/{!lead.Id}” scrolling=”true” id=”theIframe”/>
    </apex:pageBlock>
</apex:page>

then add the Visualforce Page in the Lead Page Layout.

do the same for contact!!

regards,
Omar
Mauricio GiordanoMauricio Giordano

Got it, once we have this in our App, how does our customer add it to their Lead page? Also, once they add it to their Lead page, will it show it up for all leads or just that lead? Last question, is there a way to send a unique token from Salesforce to our page so we can verify the origin and authenticate the request?

Omar Rajab 94Omar Rajab 94
Q1: edit the page layout of the lead object and add the Visualforce page
Q2: for the current lead, not all leads!
Q3: if there is authentication, then you have to create apex controller, and in this controller you write httprequest to get the data.

regards,
Omar