embedded external webpage

  • 1
  • Question
  • Updated 3 months ago
  • Answered
Hi,

Not sure this is simple or not, but i have a feeling I'm missing something..

I'm trying to embed couple different web pages directly into skuid tabs

I want my users to not have to click a button , that in turns, pops a new window with "websearch results"

Example: I have this button to search the business on google:
http://www.google.com/search?q={!Lead.Company},{!Lead.State}

Anyone knows how would I have the result of that link show directly in a skuid page?

Or worse case have the button show in same skuid page the result of search (not pop a new window or open in same window)


Thank you
Photo of Dave

Dave

  • 6,964 Points 5k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 45,308 Points 20k badge 2x thumb
The basic pattern is as follows. 

1. Build a model on Lead that includes company and state. 

2. Put a template component in your page and bind it to your lead model so we can merge data from the model into the iFrame.

3. Add HTML code to the template that looks like this:  with iframe code that looks like this: 

<iframe src="www.google.com/search?q={{Company}},{{Lead.State}}" width="100%" height="450" frameborder="0" style="border:0"></iframe>

The key is that skuid does not use the VF data merge syntax   -  {!Lead.State}  instead we use {{double braces}} or {{{Triple Braces}}} around the api name of the field from your model.  More information on merge syntax here: http://help.skuidify.com/m/11720/l/216661-skuid-template-syntax

Click on the "Allow HTML" box in your template and you will see some preview and know you are on the right track. 

Having said all that,  sometimes google does not like being stuck in an iFrame and so will yell at you.   But good luck. 
Photo of Dave

Dave

  • 6,964 Points 5k badge 2x thumb
Thank you Rob,

But my problem is any webpage I try to iframe either give me a blank page (90% of the time) or i get a standard SF page with url cannot be found (like example you gave me, as no "http://" i guess.. Can anyone confirm they can get this to work with an external webpage?

Thx
Photo of Kris

Kris

  • 190 Points 100 badge 2x thumb
I would like to know this as well. I am also just getting a blank page.
Photo of Elissa Bradley

Elissa Bradley

  • 2,434 Points 2k badge 2x thumb
I'm also trying to make this work - I want to link to an S-Docs page.  Has anyone made this work?
Photo of Elissa Bradley

Elissa Bradley

  • 2,434 Points 2k badge 2x thumb
In reading through other posts, sounds like this might not be possible in Lightning.  Has anyone had luck putting an iframe into a VF page and then displaying the VF page in a Skuid pop-up?
Photo of Clark Cregg

Clark Cregg, Solutions Engineer

  • 1,464 Points 1k badge 2x thumb
Hello Elissa. I'm not 100% sure I understand. It sounds like you want to put in an iframe inside a VF page and embed the VF page in a Skuid Pop Up on the Lightning Page?

Could you explain the desired outcome of what you are trying to build? It sounds like you could just iframe the S-Docs page inside the Skuid page using a template component and not have to use the VF page.

Let me know if there is some other factor I'm not aware of here.

Thanks!
Photo of Elissa Bradley

Elissa Bradley

  • 2,434 Points 2k badge 2x thumb
If I can - embedding the s-docs page in a template component would be perfect. But, I’ve been unable to get anything to display in the iframe- it shows blank. A couple of posts suggested that iframes may not work in lightning- hence my question about visual force.
Photo of David Forder

David Forder

  • 2,882 Points 2k badge 2x thumb
We have quite a few google and other searches integrated in our application.

Until a couple years ago you could surface these within iframes on skuid pages etc but Google now blocks these to avoid a vulnerability (clickjack protection) ..

You can still search these sites (a typical piece of code we use is as Rob above.. https://www.google.com/?#q={{$Model.UIResearch.data.0.ResearchName}}  .. but it needs to open a new window each time .. sorry :(
Photo of Elissa Bradley

Elissa Bradley

  • 2,434 Points 2k badge 2x thumb
Got it - thanks, David.  You saved me trying to get the iframe to work!