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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to set a hyperlink for a field?

(0) ShareShare
ReportReport
Posted on by 931

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

I have the same question (0)
  • ThivaKar Profile Picture
    931 on at

    Thank you Vilmos. Worked Perfectly !

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    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
    931 on at

    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
    238,286 Most Valuable Professional on at

    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
    46,149 on at

    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
    931 on at

    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
    238,286 Most Valuable Professional on at

    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

News and Announcements

Season of Giving Solutions is Here!

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 AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Volodya Profile Picture

Volodya 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans