Where can I get the URL for adding a VF page through iframe to a custom lightning component?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












Where can I get the URL for adding a VF page through iframe to a custom lightning component?



1 I create a VF page.



2 I know that I can display it in lightning using the following approach



<iframe src="!'myURL'" width="100%" height="300px;" frameBorder="0"/>



Where can I get myURL?










share|improve this question





















  • I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
    – codeyinthecloud
    Aug 31 at 13:41

















up vote
1
down vote

favorite












Where can I get the URL for adding a VF page through iframe to a custom lightning component?



1 I create a VF page.



2 I know that I can display it in lightning using the following approach



<iframe src="!'myURL'" width="100%" height="300px;" frameBorder="0"/>



Where can I get myURL?










share|improve this question





















  • I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
    – codeyinthecloud
    Aug 31 at 13:41













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Where can I get the URL for adding a VF page through iframe to a custom lightning component?



1 I create a VF page.



2 I know that I can display it in lightning using the following approach



<iframe src="!'myURL'" width="100%" height="300px;" frameBorder="0"/>



Where can I get myURL?










share|improve this question













Where can I get the URL for adding a VF page through iframe to a custom lightning component?



1 I create a VF page.



2 I know that I can display it in lightning using the following approach



<iframe src="!'myURL'" width="100%" height="300px;" frameBorder="0"/>



Where can I get myURL?







visualforce lightning url iframe






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 31 at 13:29









iloveseven

49516




49516











  • I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
    – codeyinthecloud
    Aug 31 at 13:41

















  • I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
    – codeyinthecloud
    Aug 31 at 13:41
















I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
– codeyinthecloud
Aug 31 at 13:41





I have answered a previous question about this you could refer that. salesforce.stackexchange.com/questions/222179/…
– codeyinthecloud
Aug 31 at 13:41











1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










You will need to provide the src here. It actually is the absolute url to your VF page along with your instance url.



So let's say you have a VF page named myVFPage, and that your instance URL is say https://your-subdomain.my.salesforce.com, then your code should look like as below:



<iframe src="https://your-subdomain.my.salesforce.com/apex/myVFPage" width="100%" height="300px;" frameBorder="0"/>


And to add more details to this, you may like to actually maintain a variable on your component which gets populated during the init of your component which gets populated with your instance URL. You will need to make a server trip here though. But with this approach, you don't have to hard-code the URL whenever you deploy the code to other sandboxes. And that you use that variable to construct the URL. Something as below:



<iframe src="{!v.baseURL + '/apex/myVFPage'" width="100%" height="300px;" frameBorder="0"/>





share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "459"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230871%2fwhere-can-i-get-the-url-for-adding-a-vf-page-through-iframe-to-a-custom-lightnin%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    You will need to provide the src here. It actually is the absolute url to your VF page along with your instance url.



    So let's say you have a VF page named myVFPage, and that your instance URL is say https://your-subdomain.my.salesforce.com, then your code should look like as below:



    <iframe src="https://your-subdomain.my.salesforce.com/apex/myVFPage" width="100%" height="300px;" frameBorder="0"/>


    And to add more details to this, you may like to actually maintain a variable on your component which gets populated during the init of your component which gets populated with your instance URL. You will need to make a server trip here though. But with this approach, you don't have to hard-code the URL whenever you deploy the code to other sandboxes. And that you use that variable to construct the URL. Something as below:



    <iframe src="{!v.baseURL + '/apex/myVFPage'" width="100%" height="300px;" frameBorder="0"/>





    share|improve this answer


























      up vote
      4
      down vote



      accepted










      You will need to provide the src here. It actually is the absolute url to your VF page along with your instance url.



      So let's say you have a VF page named myVFPage, and that your instance URL is say https://your-subdomain.my.salesforce.com, then your code should look like as below:



      <iframe src="https://your-subdomain.my.salesforce.com/apex/myVFPage" width="100%" height="300px;" frameBorder="0"/>


      And to add more details to this, you may like to actually maintain a variable on your component which gets populated during the init of your component which gets populated with your instance URL. You will need to make a server trip here though. But with this approach, you don't have to hard-code the URL whenever you deploy the code to other sandboxes. And that you use that variable to construct the URL. Something as below:



      <iframe src="{!v.baseURL + '/apex/myVFPage'" width="100%" height="300px;" frameBorder="0"/>





      share|improve this answer
























        up vote
        4
        down vote



        accepted







        up vote
        4
        down vote



        accepted






        You will need to provide the src here. It actually is the absolute url to your VF page along with your instance url.



        So let's say you have a VF page named myVFPage, and that your instance URL is say https://your-subdomain.my.salesforce.com, then your code should look like as below:



        <iframe src="https://your-subdomain.my.salesforce.com/apex/myVFPage" width="100%" height="300px;" frameBorder="0"/>


        And to add more details to this, you may like to actually maintain a variable on your component which gets populated during the init of your component which gets populated with your instance URL. You will need to make a server trip here though. But with this approach, you don't have to hard-code the URL whenever you deploy the code to other sandboxes. And that you use that variable to construct the URL. Something as below:



        <iframe src="{!v.baseURL + '/apex/myVFPage'" width="100%" height="300px;" frameBorder="0"/>





        share|improve this answer














        You will need to provide the src here. It actually is the absolute url to your VF page along with your instance url.



        So let's say you have a VF page named myVFPage, and that your instance URL is say https://your-subdomain.my.salesforce.com, then your code should look like as below:



        <iframe src="https://your-subdomain.my.salesforce.com/apex/myVFPage" width="100%" height="300px;" frameBorder="0"/>


        And to add more details to this, you may like to actually maintain a variable on your component which gets populated during the init of your component which gets populated with your instance URL. You will need to make a server trip here though. But with this approach, you don't have to hard-code the URL whenever you deploy the code to other sandboxes. And that you use that variable to construct the URL. Something as below:



        <iframe src="{!v.baseURL + '/apex/myVFPage'" width="100%" height="300px;" frameBorder="0"/>






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 31 at 13:47

























        answered Aug 31 at 13:36









        Jayant Das

        6,6572320




        6,6572320



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230871%2fwhere-can-i-get-the-url-for-adding-a-vf-page-through-iframe-to-a-custom-lightnin%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?