Help me open an URL in POP - UP , the URL is stored in a Salesforce Custom Field.

edited June 25, 2020 in Questions
I have been trying to open a Third Party link in a Pop-Up using iFrame.

The Link gets open in the Pop- Up when we hardcode the link, but when we try to access the link dynamically from a model.  The POP - UP Turns blank.

Comments

  • Bill McCulloughBill McCullough 💎💎
    edited April 11, 2018
    Nikita,

    Would you share XML for the iFrame and confirm what type of field you are storing the URL in.  Is it also a URL field type or a Text field?

    Thanks,

    Bill
  • edited April 16, 2018
    Hi Bill,

    Thanks for responding. Just to answer your question The field type is URL in salesforce where we are storing the link.

    Thanks
  • Bill McCulloughBill McCullough 💎💎
    edited April 17, 2018
    Nikita,

    I think it may be one of two things:  you will need to use the 'triple mustache' to have the URL render as the raw text instead of as a 'link' (which will include the HTML for the anchor tag (i.e. '<a href="...').  The other thing I would check is the context of your Template component.  Make sure you set the Model property to the model that has your URL field.

    Here is a screenshot of the template component with the iframe.

    image

    Thanks,

    Bill
  • edited April 18, 2018
    Hi Bill,

    I have used the 'triple mustache' while trying to access it in iFrame. Also, I have attached the Screenshot of the same here with.

    image

    Also, just to re-iterate the template component is in a POP-UP Action when we click on a Button.

    image

    Thanks

    Nikita
  • Bill McCulloughBill McCullough 💎💎
    edited April 17, 2018
    Nikita,

    The HTML in your template looks good.  I would check 3 other things.  First, check the Field security settings, make sure that you have Read access to the field.  Second, put the field on your page somewhere to make sure that you have a URL in the field.  Use a Template 'field' and drop the field using the triple mustache.  Lastly, copy the field value from your page and try opening the URL in another tab/window.

    Thanks,

    Bill
  • Mark DeSimoneMark DeSimone 🛠️ 
    edited February 4, 2020
    Hi NIkita,

    Bill's got great suggestions here. I also wanted to add a possibility that I ran into recently. Depending on 1) your org's security settings and 2) what you're trying to load in an iframe, the attempt to show this in an iframe may be getting blocked by Salesforce.  Are you seeing any errors in your browser console when the iframe fails to load? If so, what are they?

    Best,
    Mark
  • edited April 18, 2018
    Bill,

    Thanks for your suggestions - 

    1. Field - Level Security has Read Access to the field.
    2. Field on the page -
        
        I have tried to achieve it in two ways - 
    •     Using the field directly in FieldEditor in the base page- Where we can see the URL in the field. But is not visible in Pop-Up.
    image
    • Using the template - {{{Field Name}}} - The URL is only visible on the base page. I cannot see the URL in the Pop-Up.
    image

    The Template field also contains the same field and on this page, we can see the URL clearly.

    image

    But in the Pop-Up where we have set-up the iFrame, the URL is not getting displayed.

    image

    3. Opening the URL in a new Tab - It works fine.

    Thanks

    Nikita
  • edited April 18, 2018
    Hi Mark,

    All possible suggestions are welcomed.

    1. What exactly do I need to take care in terms of my Org's Security Settings?
    2.  Yes, I just saw the console - we are getting a URL blocked error.
    image

    Thanks

    Nikita

  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    Hmmmm ... have you tried using the following global merge functions? You can this in Skuid Help here. Seems to me that this is the issue.

    image
  • edited April 18, 2018
    Hi Pat,

    Tell me if I am wrong, according to my understanding- I just need to append {{#urlEncode}} to the Parameter used in the iFrame. Right?

    Thanks 

    Nikita
  • Pat VachonPat Vachon 💎💎💎
    edited April 18, 2018
    Correct. Or at least one of the functions in the pic. Trial and error time. ;)
  • edited April 18, 2018
    Hi,

    I just tried to work with the suggestion you provided -

    Following is the iFrame -

    image

    and the follows the output -

    image

    Please suggest.


  • Pat VachonPat Vachon 💎💎💎
    edited April 18, 2018
    View the source of the page to see what the iframe element looks like.
  • Mark DeSimoneMark DeSimone 🛠️ 
    edited April 18, 2018
    Hi Nikita,

    We'll need to see what the URL is to understand why it's not working. I'll highlight the suggestions that have already been made to look for the iframe's URL in your page's source, and also to try the iframe's URL in another browser tab to see if the link works outside of an iframe. Finally, you should be able to open the network tab in the browser developer tools, then reload the page & iframe. In there, you should see a request listed for the iframe's URL, as well as the results of the request. 
  • edited April 19, 2018
    Hi Mark,

    I was explaining it to Bill that the URL works fine in a new tab.

    But the problem I am having is to open the URL in the iFrame.

    Also, I would like to mention I tried to load the iFrame, but could not find any records in Network Tab.

    Thanks and Regards

    Nikita


  • Pat VachonPat Vachon 💎💎💎
    edited April 19, 2018
    In your first post you said you were able to  hard code the URL successfully. This essentially means that something is awry with the URL. We need to see the URL as produced by the Skuid page.
  • Mark DeSimoneMark DeSimone 🛠️ 
    edited February 4, 2020
    Hi Nikita,

    Were you ever able view the page's source code and grab the iframe's markup? 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!