Visual Builder

Get Involved. Join the Conversation.


    Shakila Murugan
    How to get browser URL in VBCS
    Topic posted August 5, 2019 by Shakila MuruganBronze Medal: 1,250+ Points, tagged Custom Code, JET, SaaS Integration, Services, Web 
    79 Views, 7 Comments
    How to get browser URL in VBCS

    Hi Team,

    I want to get browser URL when i  integrate my application in fusion, i attached one image file for your reference.

    i m using below code

    const urlParams = new URLSearchParams(window.location.href);

    it worked on normal javascript page but in vbcs its getting error like URLSearchParams is not defined







    • John Ceccarelli

      Why do you need to fetch the URL programatically to embed in fusion?

    • Shakila Murugan

      Hi John

      I need to get username and password of the member who login in fusion.

      That particular users details i need to fetch and have to show that in my application page.


      Shakila Murugan


    • Shay Shmeltzer

      This works for me fine in VB in the JS of a page: = function(){
        var url = new URLSearchParams(window.location.href);

      (While the URLSearchParams shows up with a red squiggly line, it works find when you run the page).

      • Shakila Murugan

        Thanks Shay.

        Its working fine but i get only application url , can't get Request Url. 

        How can i get that URL.





        • Shay Shmeltzer

          I'm not sure I understand the difference between application URL and request URL in your use case.

          For parameters that you pass on the URL you can just create variables in VB and mark them as input params with pass on URL - and then you'll be able to directly access them.

          Are you saying that you are passing the user and pass as parameters on the URL to your VB app?

          That's not a secure way of doing this - you should be setting single-sign-on between your VB and SaaS.


          • Shakila Murugan

            Thanks for response.

            We are not passing the user and pass as parameters on the URL to our VB app.

            Loggedin user detail will be generated as token url.

            In my case token and application url both will be binded, using jwt key we will split that url's.

            Please refer previous image. 

            Application URL-->

            Request URL--->