Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

How to set a hyperlink for a field?

Posted on by 925

Hi,

VendTable has URL field with vendor URL's.

My requirement is i have to select a record from the grid and the selected record URL field should display in the next HTML tab with a hyperlink. So far i did display the selected record URL field to next tab, but i need that as a hyperlink. Please Help!

*This post is locked for comments

  • ThivaKar Profile Picture
    ThivaKar 925 on at
    RE: How to set a hyperlink for a field?

    Thank you Vilmos. Worked Perfectly !

  • Verified answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: How to set a hyperlink for a field?

    You could use stringformat, point to the record buffer of your vendor datasource, and write it to the HTML control in the active() method of the datasource. That will refresh the control whenever a new row is selected.

    strFmt('<a href=%1>Vendor URL</a>', VendTable.YourURLfield)

  • ThivaKar Profile Picture
    ThivaKar 925 on at
    RE: How to set a hyperlink for a field?

    Hello Vilmos , Thank You for the reply..

    In the <a href> how can i set the URL field , if u have read my requirement stated above, the selected record should come in the hyperlink .

    How can i make this possible ? i.e(<a href == (selected record 'field')>)

  • Martin Dráb Profile Picture
    Martin Dráb 230,030 Most Valuable Professional on at
    RE: How to set a hyperlink for a field?

    Well, if you insist on the more complicated way, you surely can provide HTML code for the HTML control. I see that Vilmos already gave you an example.

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: How to set a hyperlink for a field?

    Check AOT > Forms > tutorial_Form_Controls, on the HTML tab you have a hyperlink. That is a HTML control, which they populate in the run method like this:

    void run()
    {
        Html.setText(  "<html><body>" +
                        "<h3>The HTML Viewer/Editor</h3>" +
                        "<p>The HTML Control can Show and Edit HTML text.<p>" +
                        "<p>It supports images and <a href=www.microsoft.com/BusinessSolutions&gt;hyperlinks</a>" +
                        "</body></html>");
        super();
    }
  • ThivaKar Profile Picture
    ThivaKar 925 on at
    RE: How to set a hyperlink for a field?

    As i said , i need the hyperlink on the HTML tabpage . After i select the record from the grid, selected record 'field'(URL from VendTable) should display as a hyperplink that users click on.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,030 Most Valuable Professional on at
    RE: How to set a hyperlink for a field?

    Do I understand correctly that by "to display URL" you mean showing a hyperlink that users can click on?

    Then why don't you simply use a button with Style = Link?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans