NavWithNav

The premier knowledge-sharing hub for Microsoft Dynamics 365 Business Central developers, architects, and ERP professionals.

Business Central Development#Business Central#DataSearch#AL Programming

Understanding the new DataSearch UI in Business Central

Nitin
5 min read
Oct 24, 2024

Introduction to DataSearch in Business Central

The new DataSearch UI introduced in recent waves significantly changes how users interact with data spanning across multiple tables. Instead of navigating to a specific list page and using the search bar, users can now search globally across configured tables directly from their Role Center.

What it means for Developers

As AL developers, this means our custom tables and critical data entities must be properly integrated into the DataSearch framework so users don't miss out on standard platform features.

Here is a quick example of an install codeunit to insert custom tables:

codeunit 50100 "DataSearch Setup Custom"
{
    Subtype = Install;

    trigger OnInstallAppPerCompany()
    var
        DataSearchSetup: Record "Data Search Setup";
    begin
        if not DataSearchSetup.Get(Database::"My Custom Table") then begin
            DataSearchSetup.Init();
            DataSearchSetup."Table No." := Database::"My Custom Table";
            DataSearchSetup."Role Center ID" := PAGE::"Business Manager Role Center";
            DataSearchSetup.Insert(true);
        end;
    end;
}

Best Practices

Always ensure that you are thoughtful about which tables you expose. Over-indexing every standard setup table degrades performance and clutters the search results. Target entities that represent master data or transactional headers.

With Power Automate, you can also leverage the DataSearch APIs if you need to replicate this search context externally.

Follow NavWithNav

Connect with Nitin on social media for more Business Central development tips and architecture insights.

Discussion (0)

Leave a comment

No comments yet. Be the first to share your thoughts!