Skip to content

tom-draper/powersearch-business-central

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerSearch for Business Central

Press / anywhere in Business Central to open a fast, intelligent, Spotlight-style search overlay. Jump to customers, orders, and pages, run reports, trigger actions, or perform calculations and conversions.

customer

What it does

Business Central's built-in search is slow, takes you out of context, and is frustratingly strict, requiring exact matches, so even small differences like “&” vs “and” can break your search.

PowerSearch puts a powerful, intelligent search box one keypress away. Results appear instantly as you type, grouped by type, with the most relevant match pre-selected so you can press Enter to jump straight there. It also adds quick actions for creating records, running reports, and performing calculations and conversions.

Search

  • Customers, vendors, items, contacts
  • Sales orders, purchase orders
  • Posted sales/purchase invoices and credit memos
  • Posted shipments and receipts
  • Transfer orders
  • G/L accounts, bank accounts
  • Projects / jobs, employees, fixed assets, resources

Actions

  • Reports (Aged Accounts Receivable, Trial Balance, etc.)
  • Quick actions - create a new sales order, customer, item, etc. without navigating first
  • Calculator - type 250 * 1.2 and get the answer inline
  • Currency conversion - type 2500 EUR to USD and get the answer inline using the latest exchange rates from the currency table
  • Current date and time
item
new-sales-order
currency

Setup

After installing the extension, search for PowerSearch Setup (or find it under Administration). From there you can toggle which entity types are included in results and set the maximum number of results returned per type.

Limitations

This extension uses platform workarounds within Business Central to make the search available on almost every page. It does this by embedding a lightweight component into each page to attach the search functionality. Some page types, such as report pages, do not support this approach due to platform limitations.

In order for the search to launch on the home page, within the home page content the PowerSearch embedded component must be placed towards the top of the page ensure it is rendered. By default, we use the addfirst(rolecenter). It can be removed or lowered with personalisation, but this may affect the reliability of the search hotkey.

Adding role centers

The extension covers the main built-in BC role centers out of the box. If your users have a custom role center, add a page extension in RoleCenterExt.PageExt.al:

pageextension 61563 "PS My Custom RC" extends "My Custom Role Center"
{
    layout
    {
        addfirst(rolecenter)
        {
            part(PowerSearchPart; "PS Part")
            {
                ApplicationArea = All;
            }
        }
    }
}

Contributions

If you find and issues or have feedback, consider opening an issue or creating a pull request.

Development

Built with AL (Business Central extension language) and vanilla JavaScript - no npm, no bundler.

Prerequisites: AL Language extension for VS Code, access to a BC sandbox or online environment.

Publish to your sandbox with Ctrl+Shift+B (AL: Publish) from VS Code.