web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Open an url address through a button inside the form of an entity

(0) ShareShare
ReportReport
Posted on by 195

Hello everyone,

I have a question.

How can I open an url address through a button inside the form of an entity?

Thank you very much

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Just add following code - window.open("https://google.com"); to your button click handler.

  • Verified answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Yes you can use window.open('http://arpitmscrmhunt.blogspot.com');

    window.open has following features also. Can take advantage based on your requirement:

    window.open("", "", "width=200,height=100");

    window.open("http://arpitmscrmhunt.blogspot.com", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");

    //Open a new window called "MsgWindow", and write some text into it:

    var myWindow = window.open("", "MsgWindow", "width=200,height=100");

    myWindow.document.write("<p>This is 'MsgWindow'. I am 200px wide and 100px tall!</p>");

    function openWin() {

       myWindow = window.open("", "myWindow", "width=200,height=100");   // Opens a new window

    }

    function closeWin() {

       myWindow.close();   // Closes the new window

    }

    Hope it helps.

     

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.

    Cheers

    Arpit

    https://arpitmscrmhunt.blogspot.in

     

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    Do you want to open the url inside the form or in new window ?

    For new window you can open the window using window.open as suggested by Andrew and Arpit.

    In addition if you want to open an external URL inside the form the you can create an html web resource  with an iframe and on button click event you can set the iframe src like below.

    document.getElementById("MyFrame").src="https://bing.com&quot;;

    You can also add directly the external URL and show hide the content of the Iframe .

    please refer below

    www.inogic.com/.../different-areas-in-dynamics-crm-where-users-can-access-external-pages

  • Zucko_mac Profile Picture
    195 on at

    thank you very much worked very well.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans