microsoft / microsoft/BCApps

[Bug]: Filter engine crashes with "Did not expect '('" when company name contains parentheses — BC28 regression

Open
#9,165 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Team: SCM
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Describe the issue

Since upgrading to Business Central Version 28, users are unable to open the Purchase Invoice list page in any company whose name contains parentheses ( ). The page immediately throws a filter parsing error and closes.
This is a regression — the company names have not changed, and the issue did not occur prior to the BC28 upgrade.

An error occurred while interpreting the filter: Did not expect '('.
Page [Company Name], Purchasing, Purchase Invoices has to close.

Expected behavior

The Purchase Invoice list page opens normally regardless of the company name.

Steps to reproduce
  1. Have a company in Business Central whose name contains parentheses — e.g. SHINE (Charity 249338)
  2. Log in as a user without SUPER permissions
  3. Navigate to Purchasing → Purchase Invoices
  4. The page immediately closes with the filter error above
    The page fails to open and throws: "An error occurred while interpreting the filter: Did not expect '('"
Additional context

• The same error pattern (Did not expect '(') has been reported across multiple BC versions when parentheses appear in field values used in dynamic filter construction (e.g. item BOM codes, payment terms, vendor numbers)
• Partial fixes have been applied historically (e.g. "Fix a copy of companies with brackets in the name" — BC16) but the root cause in the filter engine has never been comprehensively addressed
• The only current workaround is to rename the company to remove the parentheses, which is disruptive for organisations with legal or operational naming requirements
• A permanent fix allowing literal ( ) characters in company names without breaking the filter engine would resolve this for all affected tenants

I will provide a fix for a bug
  • I will provide a fix for a bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Purchase Invoice page failure with a company named SHINE (Charity 249338), using a user without SUPER permissions. Trace the dynamic filter construction and filter-engine parsing involved in opening the page; no file or test is named in the issue. Done means the page opens normally and literal parentheses in company names no longer produce the reported error.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.