0

I am facing an issue while opening a webpage in salesforce iFrame. I was able to do that till yesterday, but now I am getting below error. enter image description here

QuoteToEsign is the visualforce page where I am opening using below code

<center><apex:commandButton value="Back to Quotes" action="{!back}"/></center> 
  <apex:iframe src="{!Url}" scrolling="true"/> 
 <center><apex:commandButton value="Back to Quotes" action="{!back}"/></center>

Url is the parameter which I am returning from Controller as a String which holds the URL. Please let me know how to fix this issue.

I checked the logs and I see that getUrl method is not at all executing like before. It used to work but all in a sudden it is now working and unable to open the iFrame below is the controller.

public with sharing class Quote_Iframe
{
public Quote_Iframe(){ } 
    String qId= System.currentPageReference().getParameters().get('id');
    Quote quote = [select id,blusyn__eSign_Url__c,blusyn__eSignId__c from Quote where id=:qId];
    public String url {get; set;}


    public String getUrl()
    {
        if(qId != null && qId !='')
            url = quote.blusyn__eSign_Url__c;
            system.debug('iFrame URL is :: '+url);
         return url;
    }
    public pagereference back()
    {
        return new pageReference('/'+qId);
    }
    public Quote_Iframe(ApexPages.StandardController controller)
    {

    }}

I am not getting any idea why I am not getting iFrame anymore. Java team saying that there are no issues from their end. but Please check above snippet and for more errors. Thank you.

2
  • Is your org on Winter 19? Have you enabled any critical updates? And what is the CSP settings for your org? Commented Oct 3, 2018 at 7:21
  • I have not enabled any critical updates so far. Remote site settings already has the iFrame website added. I tried adding the same to CSP trusted sites which does not fix the issue.
    – AshSFcloud
    Commented Oct 3, 2018 at 8:01

1 Answer 1

0

I don't know what just happened, Above code worked since 1 year and then suddenly stopped working and unable to get to getUrl method. Now, I am manually calling getUrl() from StandardController and now working like it used to be. Thank you for your responses.

public Quote_Iframe(ApexPages.StandardController controller)
{
    getUrl();
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .