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

ToolTip method

(0) ShareShare
ReportReport
Posted on by 75

Hi,

When I override the ToolTip method of the control in the form-design, I get a display that is different from the standard.

below, the standard display and the new display.

4201.1.png

36604.2.png

*This post is locked for comments

I have the same question (0)
  • udaY-ch Profile Picture
    5,133 on at

    hi,

    Can you show you're code, Are you using any label while returning the string in tooltip method may be a label issue.

    /Uday.

  • DJosef Profile Picture
    75 on at

    this is my code :

    public str toolTip()
    {
        return strFmt("@SPL803", WHSShipmentTableUnassignedAddress.ZipCode, WHSShipmentTableUnassignedAddress.CountryRegionId);
    }


    I tested in several ways
    it's the same even with a static text, for example :

    public str toolTip()
    {
        return "static text";
    }


  • Rustem Galiamov Profile Picture
    8,072 on at

    Hi DJosef!

    This is standard toolTip display if you use it on form control. If your control is the field from table you may override toolTipField() method on the table and write something like this:

    public str toolTipField(FieldId _fieldId)
    {
        str ret;
    
        switch (_fieldId)
        {
            case fieldNum(YourTable, YourField) :
                ret = "My tooltip";
                break;
            default :
                ret = super(_fieldId);
                break;
        }
        
        return ret;
    }


    and then you will get display from your first image.

  • Douglas Noel Profile Picture
    3,905 on at

    Hi,

    I can't remember exactly. But I think there is a problem using tooltips within controls part of a grid.

    The tooltip (information shown) seems to be always generated from the current selectes record, this is not neccessarily the one under the mouse cursor.

    To my opinion, you can't solve this using tooltips. Maybe there is a way using an artifical referencegroup in a really small control right or left to simulate the required information using this way.

    regards

    Douglas

  • DJosef Profile Picture
    75 on at

    Hi Rustem,

    I tried the following code but it does not work

    I get the standard display

    public str toolTipField(FieldId _fieldId)
    {
        str ret;
            
        switch (_fieldId)
        {
            case fieldNum(LogisticsPostalAddress, ZipCode) :
                ret = "My tooltip";
                break;
            default :
                ret = super(_fieldId);
                break;
        }
    
        return ret;
    }


  • DJosef Profile Picture
    75 on at

    Hi Douglas,

    can you explain to me how to proceed because i am a new ax developer and I did not understand what to do

    The problem is in the "Transportation management" module in the "Load planning workbench" form

    Thanks

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Would your requirement be solved if you simply added a line break in your label that you use in the tooltip? Or is there a business requirement (and business value for the time you are using) to have the tooltip look 1:1 the same than the standard tooltips? You already found a way to get correct data into the tooltip. 

  • DJosef Profile Picture
    75 on at

    Yes Nikolaos, is a business requirement to have the tooltip the same than the standard tooltips

  • Rustem Galiamov Profile Picture
    8,072 on at

    Hmm...I've created a custom table, then added PurchId field on my table, then override toolTipField() and it works.

    But! I've added a standard PurchTable table to my custom form as DS and tried to override toolTipField() on PurchTable and it's not working.

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans