Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

ToolTip method

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

  • Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: ToolTip method

    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.

  • DJosef Profile Picture
    DJosef 75 on at
    RE: ToolTip method

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

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: ToolTip method

    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
    DJosef 75 on at
    RE: ToolTip method

    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

  • DJosef Profile Picture
    DJosef 75 on at
    RE: ToolTip method

    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;
    }


  • Douglas Noel Profile Picture
    Douglas Noel 3,905 on at
    RE: ToolTip method

    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

  • Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: ToolTip method

    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.

  • DJosef Profile Picture
    DJosef 75 on at
    RE: ToolTip method

    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";
    }


  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: ToolTip method

    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.

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans