I've read through several documents regarding iFrames and certain limitations when using with Lightning Components. What I am trying to do is is use an Account Id to filter results with the iFrame.

So, when a page loads in salesforce, the account ID for that record is passed to the iFrame so filter data within the iFrame only associated with that particular account. Does anyone know if this is possible and how can I achieve this. Here is some sample code for my iFrame:

<aura:attribute name="iframeUrl" type="String" />
<aura:attribute name="width" type="String" />
<aura:attribute name="height" type="String" />
<aura:attribute name="scrolling" type="String" />
<aura:attribute name="frameBorder" type="String" />
<aura:attribute name="style" type="String" />
<aura:attribute name="sandbox" type="String" />

<iframe src="{!v.iframeUrl}"


I found a resolution to this. While I wasn't able to use the lightning component to complete this action, I was able to do so using a visualforce page and standard accountController. In the url, simple pass or set the filter value like such: &filtervalue={!Account.Id}. This will set the filter value to the Id of the current record (provided the Id's are loaded into the source data, and the field name is an exact match).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.