Skip to main content

I am using the HTML functionality of the TEXT component in V2 attempting to dynamically load an IFrame.


I can’t seem to get the syntax right. I am able to get the IFrame URL to work when I hard code the parameter. And I am able to see Merge Variables in the HTML when they are not in the IFrame URL, but syntax wise I think I am doing something wrong in the URL.


The following works when hardcoded


https://instance--lightnings--skuid.cs37.visual.force.com/apex/skuid__ui?page=OppFiles2Zip&id=0060B00000f3UUQQA2" style="border:none;" width="98%">

but then I try to use the merge field inside the URL it doesn’t work. If I place the merge field somewhere else outside of the iFrame tag I can see that its pulling the right value. For some reason the substitution is not happening.


https://instance--lightnings--skuid.cs37.visual.force.com/apex/skuid__ui?page=OppFiles2Zip&id={{Id}}" style="border:none;" width="98%">

Is there special syntax that is needed within the src attribute of the HTML tag in the V2 Text component for it to recognize it needs to substitute the merge variable?

Hi Joseph,

There was a product issue (DSC-1576) that was resolved in 12.2.12 that may be relevant here. Here’s its description:
“DSC-1576 - Affects v2

Context unavailable for Wrapper component within a sliding panel
Previously, data components within a Wrapper component within a sliding panel would not receive data from context. This meant that a row action in a Table component that launches a sliding panel would not pass row data into any components within Wrapper components within the sliding panel.

Now, context data is passed through Wrapper components within sliding panels.”

If this is the root of your problem, using a global merge variable instead of a model/context specific variable should work if your target model just has one row. But another more flexible workaround here should be to move affected components outside of the wrapper or responsive grid.

If this doesn’t seem relevant to your issue, here are a couple follow-up questions:
  • Is your text component attached tot he model where the {{Id}} variable is?

  • Does a global merge variable like {{$Model.myModel.data.0.Id}} work, or yield the same problem?


Hi Mark,


The text component is attached to the model so the following works if placed above the iFrame


ID is : {{Id}}

Global Merge : {{$Model.PrimeOpportunity.data.0.Id}}
In both cases it shows the same ID. And if I statically type that ID into the src attribute of the iFrame everything works. But if I use either of these merge fields in the src attribute of the iFrame I get the error.

It seems like the substitution is working within the Text component HTML but not when it is within the src attribute. Maybe there is some sort of formatting that is happening to the attributes (i.e. HTML encoding) before the substitution is trying to match causing the match to fail?


Not sure, but if you drop in a text component, create an iFrame in the html and try to use a merge field in the src attribute it doesn’t seem to be working.


Hi Joseph, do you see any error messages (even in the browser console) when the problem happens? 
Also, please let me know which version of Skuid this is happening in.


Joseph,


Did you determine how to pass a SF field into an Iframe. Can’t find any documentation?


Cheers,


Bill Fox


Reply