1

I have a custom component developed for our community. It's purpose: to display DocuSign envelope in a modal for user to sign. User click a button "Complete" >> Modal pops up >> user signs the document >> clicks Done inside the DocuSign UI. At this point I would like to close the modal entirely, but for now I would be happy if we could re-direct a user to some other page. It looks like by default DocuSign has this feature that will navigate you to whatever page you want. I set it to https://www.docusign.com/devcenter, but getting this error:

Refused to display 'https://www.docusign.com/devcenter&envelopeId=ABC123456789?event=viewing_complete' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

And here is what my modal with embedded iframe looks like.

<section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_large" >

<div class="slds-modal__container">
    <header class="slds-modal__header">
        <lightning:buttonIcon iconName="utility:close"onclick="{! c.closeModel }" alternativeText="close" variant="bare-inverse" class="slds-modal__close"/>
    </header>
    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
        <div class="slds-align_absolute-center" id="receipentSigningDiv" style="display:none" >
            <iframe
                id="iFrameId"
                src="{!v.signingURL}"
                width="100%"
                height="800"
                onload="{!c.hideSpinner}"
                sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"
                frameborder="0">
                </iframe>
        </div>
    </div>
</div>
</section>
1

Go to Setup > Security Controls > Session Settings and uncheck:

"Enable clickjack protection for customer Visualforce pages with headers disabled"

enter image description here

I think that this should fix that issue.

There is an explanation on why this could be failing: Check this answer.

1
  • I tried that already, no luck. Plus this is a lightning component I am working with. The setting you mentioned is for Visualforce. – Art S Nov 2 '19 at 5:06
1

Please add this site domain in CSP Trusted Sites in salesforce this is cumpulsary when we are calling the third API using Frontend So we need to add its domain in CSP Trusted Sites Go to Setup > CSP Trusted Sites and add your url by clicking on new for example https://developers.docusign.com . thanks

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.