Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Want to remove hyperlink from form control

(0) ShareShare
ReportReport
Posted on by 2,474

Hi All,

when the form is in edit mode the control has lookup behavior which is required but when it is in non-edit mode, it is hyperlinked which I don't want.

The following picture represents edit mode behavior.

0842.1.JPG

The following picture represents non-edit mode behavior and contain hyperlinked data.

1018.2.png

I just want to remove hyperlink from the text in non-edit mode.

Thanks,

Raziq

*This post is locked for comments

  • krishna.rao@dax Profile Picture
    3,002 on at
    RE: Want to remove hyperlink from form control

    Also you could make " Enable Form ref " property of control to - No

    Forum_5F00_D365FO_5F00_DisableHyperLink.png

  • Suggested answer
    Mohammad Raziq Ali Profile Picture
    2,474 on at
    RE: Want to remove hyperlink from form control

    Yes, I have done it.

    I coded this in run method of form and got black color text.

    if(!this.inViewMode())

    {

     Control.colorScheme(FormColorScheme::RGB);                                        Control.backgroundColor(WinAPI::RGB2int(255,255,255)); 

     Control.foregroundColor(WinAPI::RGB2int(0,0,0));

     }

    Thanks for douglas for your hint...

    Thanks,

    Raziq

  • Mohammad Raziq Ali Profile Picture
    2,474 on at
    RE: Want to remove hyperlink from form control

    Hi Douglas Noel,

    That's what I want exactly which you have posted but the text should be in black color.

    Thanks,

    Raziq

  • Verified answer
    Douglas Noel Profile Picture
    3,905 on at
    RE: Want to remove hyperlink from form control

    Hi Mohammad,

    a dirty solution (for this one control could be the following:

    overwrite the mothods jumpref, mousenter, mouseleave, the hyperlinks isn't shown anymore

    public void mouseEnter(int _x, int _y, int _button, boolean _Ctrl, boolean _Shift)
    {
        if (!element.inViewMode())
        {
            super(_x, _y, _button, _Ctrl, _Shift);
        }
    }
    
    public void mouseLeave()
    {
        if (!element.inViewMode())
        {
            super();
        }        
    }
    
    public void jumpRef()
    {
        if (!element.inViewMode())
        {
            super();
        }
    }


    regrads

    Douglas

  • Sohaib Cheema Profile Picture
    46,644 User Group Leader on at
    RE: Want to remove hyperlink from form control

    in addition to what I suggested before do one thing more i.e you can add what Bhaskar has told i.e set ViewEditMode = Edit (on control properties)

  • Mohammad Raziq Ali Profile Picture
    2,474 on at
    RE: Want to remove hyperlink from form control

    Hi Sohaib bhai,

    I don't want blue color hyperlink itself.

    Thanks,

    Raziq

  • 5400 Profile Picture
    7,162 on at
    RE: Want to remove hyperlink from form control

    Hi Raziq,

    I can say one workaround, If edit mode it is going to correct master table, you can set default property of control as "Edit" instead of "Auto".. it will be always edit mode.

    Thanks

    Bhaskar

  • Sohaib Cheema Profile Picture
    46,644 User Group Leader on at
    RE: Want to remove hyperlink from form control

    The requirement is not making much sense, but can be achieved as following

    Go on DataSource, Reach to field where you want to stop "View Details"

    and write method as under

    public void jumpRef()

    {

       //super();

    }

    this should make hyperlink non-workable. you would not be able to "View Details". also nothing will happen if you will click hyperlink

  • Mohammad Raziq Ali Profile Picture
    2,474 on at
    RE: Want to remove hyperlink from form control

    Hi André Arnaud de Calavon,

    I just don't want this field to be hyperlinked.

    Is it feasible?

    Thanks,

    Raziq

  • André Arnaud de Calavon Profile Picture
    296,000 Super User 2025 Season 1 on at
    RE: Want to remove hyperlink from form control

    Hi,

    I assume this is a customization? Then check if the correct menu item is used as FormRef on the table and also if the relation is setup correctly between this field and the reference table.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Kempeth Profile Picture

Kempeth 4

#1
Andy Adamak Profile Picture

Andy Adamak 4

#1
Community Member Profile Picture

Community Member 4

Featured topics

Product updates

Dynamics 365 release plans