Skip to main content

Notifications

Dynamics 365 general forum

URL Field - Open in a new window/tab with navigation

Posted on by 45

Hi,

I am having an issue with opening external url from a url-field. The problem is that Chrome opens the url in a new window but with no navigation options. The field is populated by an external system. I need to open the url in a new window or tab with the standard navigation bar. 

Is there any body who have solved similar issues?

  • Sebastian J Profile Picture
    Sebastian J 45 on at
    RE: URL Field - Open in a new window/tab with navigation

    Thank you for your suggestion.

    The URL looks ok after implementing the JS but now the URL is no longer clickable.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: URL Field - Open in a new window/tab with navigation

    Hi Sebastian,

    If you have access to add JS code, you could try the below:

    function setURL() {
    
      var field = parent.document.getElementById("new_url");
    
      var fieldURL = Xrm.Page.getAttribute("new_url").getValue();
    
      if (fieldURL != null) {
    
        var fieldHTML = "<a href=" + fieldURL + " target='_blank'>" + fieldURL + "</a>";
    
        field.innerHTML = fieldURL;
    
      }
    
    }

    It will overwrite the original elements and replace the field with <a> tag. 

    You could add the function to Form > OnLoad Event and let it excute when form onload.

    Regards,

    Clofly

  • Rickards08 Profile Picture
    Rickards08 200 on at
    RE: URL Field - Open in a new window/tab with navigation

    Try using the loadPanel function.

    docs.microsoft.com/.../loadpanel

    You could also have an iFrame in a tab thats hidden.

    And then when you want to, load and display the iframe.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans