Add tooltips to your extension

Completed

Even the best designed user interface can be confusing to some. Predicting what users will find confusing is difficult, which is why the base application includes tooltips for all controls and actions.

The Tooltip property sets whether tooltips are provided for the given control, such as a field or action. In the client, tooltips appear when you point to the caption of the control.

The Tooltip property needs to be set on:

  • Actions in the ribbon

  • Fields on pages

  • FactBoxes

  • Activity buttons

  • Action containers

The Business Central user assistance model is based on the following principles:

  • Get started - Default values and setup wizards help simplify your ability to start using Business Central with your own data. In-product videos give new users a quick introduction to how the product works. Home pages give quick access to key tasks so that each user can get started with their work every day.

  • Get unblocked - Embedded user assistance that is implemented as tooltips will answer most immediate questions about what fields and actions do.

  • Learn more - The Help menu and the tooltips provide context-sensitive links to Help articles that have more information.

Apps, extensions, and customizations are expected to follow the same model by applying tooltips to controls on page objects and by providing links to Help for their functionality.

The Customer Rewards extension includes set tooltips in the page and page extension objects that were created in the previous modules.

Verify that you have set the tooltips by using the following code samples:

  • Rewards Level List page:

    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(Level; Rec.Level)
                {
                    ApplicationArea = All;
                    Tooltip = 'Specifies the level of reward that the customer has at this point.';
                }
    
                field("Minimum Reward Points"; Rec."Minimum Reward Points")
                {
                    ApplicationArea = All;
                    Tooltip = 'Specifies the number of points that customers must have to reach this level.';
                }
            }
        }
    }
    
  • Customer Card Ext. page extension:

    layout 
    { 
        addafter(Name) 
        { 
            field(RewardLevel; RewardLevel) 
            { 
                ApplicationArea = All; 
                Caption = 'Reward Level'; 
                Description = 'Reward level of the customer.'; 
                ToolTip = 'Specifies the level of reward that the customer has at this point.';
                Editable = false; 
            } 
    
            field(RewardPoints; Rec.RewardPoints) 
            { 
                ApplicationArea = All; 
                Caption = 'Reward Points'; 
                Description = 'Reward points accrued by customer'; 
                ToolTip = 'Specifies the total number of points that the customer has at this point.';
                Editable = false;
            }
        }
    }
    
  • Customer List Ext. page extension:

            action("Reward Levels")
            {
                ApplicationArea = All;
                Image = CustomerRating;
                Promoted = true;
                PromotedCategory = Process;
                PromotedIsBig = true;
                ToolTip = 'Open the list of reward levels.';
    
                trigger OnAction();
                var
                    CustomerRewardsExtMgt: Codeunit "Customer Rewards Ext Mgt";
                begin
                    if CustomerRewardsExtMgt.IsCustomerRewardsActivated() then
                        CustomerRewardsExtMgt.OpenRewardsLevelPage()
                    else
                        CustomerRewardsExtMgt.OpenCustomerRewardsWizard();
                end;
            } 
    

The Microsoft user assistance model requires a tooltip for all controls of type Action and Field that exist on page objects.

Follow these guidelines when creating tooltips for controls:

  • If the control is a field, begin with the verb specifies.

  • If the control is an action, begin with a verb in the imperative form, such as calculate or view.

  • Include the most valuable information that users need to perform the task(s) that the field or action supports.

  • Ensure relevance. For example, for the Post action, don't enter Post the document. Instead, enter Update ledgers with the amounts and quantities on the document or journal lines.

  • Describe complex options in tooltips for option fields.

  • Use a colon to call out the option name and its description.

  • Try to not exceed 200 characters, including spaces. This approach makes the tooltip simpler to scan so the user can get unblocked quickly. However, the UI will render longer tooltip text if you want to provide more detailed user assistance.

  • Avoid making line breaks in the tooltip text.

  • The UI can't render formatting or line breaks in tooltips.