Wednesday 29 May 2024

Resolving the DML Statement Error During the Business Central Upgrade

Upgrading to Business Central can sometimes throw unexpected errors, and one such error we recently encountered involved a DML statement issue with the 'Access Control' table. Here, we’ll walk you through the problem and how we resolved it.

The Error

During an upgrade attempt from BC14 to BC23, the Event log reported the following error related to the 'Access Control' table:


The target table 'BC14PROD_UPG.dbo.Access Control’ of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.

Investigation and Findings

Upon investigating the error, we discovered that the 'Access Control' table had several triggers enabled. Triggers in SQL Server are special types of stored procedures that automatically run when specific actions occur in the database.


The upgrade process failed because the DML statement included an OUTPUT clause without an INTO clause, which conflicted with the enabled triggers. To resolve this, we deleted the triggers on the 'Access Control' table.

Steps to Resolve the Error

1.    Identify Triggers: First, identify any triggers associated with the 'Access Control' table.

2.      Delete Triggers: Next, delete the identified triggers.

3.      Re-run the Upgrade: After deleting the triggers, we re-ran the upgrade process, which completed successfully.


If you encounter the DML statement error during your BC upgrade, check for and remove any triggers on the associated table. This straightforward solution allowed our upgrade to proceed without further issues.


We hope this insight helps others facing similar upgrade challenges. If you have any questions or need further assistance, feel free to reach out in the comments below.


Happy upgrading!

Tuesday 12 March 2024

Page Scripting Tool in #msdyn365bc (BC24 Preview)

The Page Scripting Tool offers users a more efficient way to validate their key scenarios. By capturing user interactions and replaying them seamlessly within the UI, the tool eliminates the need for complex external testing environments, reducing both time and effort.
This simplicity not only accelerates the testing process but can be used for training and replication of bugs for developers.

Monday 11 March 2024

View incoming documents in archived quotes and orders (BC24)

The capability to access incoming documents within sales and purchase quotes and orders, even after they have been archived, significantly enhances document management efficiency. This feature ensures uninterrupted access to crucial information, facilitates well-informed decision-making, and contributes to a reduction in administrative overhead.

Once you archive purchase and sales quotes and orders, whether through manual or automatic processes, the archived versions of these documents retain the incoming documents that were attached before the archival. This ensures that the historical record includes all pertinent incoming document information for reference.


As an illustration, let's initiate the creation of a purchase order, attach a relevant incoming document to it, and subsequently manually archive the order.


Upon accessing the Purchase List Archive page and reviewing the archived versions of a purchase order, note that the Incoming Document FactBox will display attachments that were originally linked to the initial document. This ensures comprehensive visibility into the attached incoming documents even within the archived records.


By default, the Incoming Documents FactBox is hidden; however, you have the flexibility to personalize pages and add them according to your preferences.

Sunday 10 March 2024

Connect Field Service operations with #msdyn365bc (BC24)

This integration is helpful for businesses offering professional services. It combines service task management, consumption tracking, and financial handling into a single, seamless system, benefiting technicians, managers, and finance departments. It streamlines work order and consumption management in Field Service, allowing for efficient invoicing and fulfillment through Business Central.

Sunday 31 December 2023

Print directly to local printers from the Job Queue with E-Print in Business Central SaaS


We cannot select "Report Output Type" as "Print" in "Job Queue" to print a report in Business Central SaaS

We get the following message.

You cannot select a printer from this online product. Instead, save it as PDF, or another format, which you can print later.

The output type has been set to PDF.


We need to make the below code change to achieve this.

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Job Queue Start Report", 'OnBeforeRunReport', '', false, false)]

local procedure "Job Queue Start Report_OnBeforeRunReport"(ReportID: Integer; var JobQueueEntry: Record "Job Queue Entry"; var IsHandled: Boolean);


        if JobQueueEntry."Job Queue Category Code" = 'PRINT' then

            JobQueueEntry."Report Output Type" := JobQueueEntry."Report Output Type"::Print;


Based on that, I created a “PRINT” Job Queue Category and changed the Report Output Type before running the report.


Next, Navigate to the “Printer Management” page and set up an “Email Printer”.


Enter your printer's E-Mail address as shown below.


Select the “Email printer” for the report you want to print on the “Printer Selection” page.


Create a “Job Queue Entry” as per your requirements.

NOTE: do not forget to set “Job Queue Category Code” as “PRINT”


You can ignore “Report Output Type” here as we change it via code.

Or you can create an action on the “Job Queue Entry” page to change it to "Print" as well.

When the Job Queue has successfully executed then an email will be sent to the printer's email address which will be taken care of.




What is E-Print?


Thursday 30 November 2023

How to customize the #msdyn365bc theme for your organization

The organization theme takes center stage in the top navigation bar for all members within your organization. As administrators, you hold the power to craft multiple themes tailored to different segments of your organization, giving you the flexibility to curate unique experiences. This includes the ability to establish a default theme that universally applies or create up to four distinct group themes assignable to various Microsoft 365 groups.

Friday 6 October 2023

Business Central Error Dialog for Enhanced User Support - (BC23)


The AL language boasts a wealth of error handling features, empowering you to navigate unexpected situations that may arise during code execution. 🧩

When an error surfaces, Business Central's client steps in, displaying an error dialog to provide users with crucial information. 🖥️

In our latest article, we dive deep into the various components of this error dialog. 📚✨ Understanding them can significantly enhance your ability to assist users in resolving any challenges they may face. 💪

Beginning with version 22, the error dialog in Business Central has been structured into four distinct parts:

v  Title (Optional):

Ø  This is the first part of the error dialog and is optional. It typically provides a concise and descriptive title for the error message to give users a quick idea of the issue at hand.

v  Message Directed to the User:

Ø  This is where the main error message is displayed, providing information about the problem or issue that has occurred. It's directed towards the user and aims to communicate the nature of the error in a clear and user-friendly manner.

v  Copy Details Action:

Ø  This part includes an action called "Copy Details." When clicked, this action allows users to copy additional technical details related to the error. These details can be valuable when reporting the issue to support teams or developers for troubleshooting.

v  Yes or No Question on Message Helpfulness:

Ø  The final part of the error dialog asks the user a question, typically in a yes or no format, regarding whether the message was helpful. This feedback mechanism helps gauge the effectiveness of the error message in assisting users.

This structured approach to error dialogs enhances user experience by providing clear and informative error messages while also collecting user feedback on message effectiveness. Users can copy technical details for further analysis or reporting, contributing to more efficient issue resolution.


The following figure shows an example of a “Testfield” error in the 2023 release wave 1 and earlier.


We currently lack the 'Copy Details' option to provide developers or the support team with error-specific information.

In the event that we need to undo a change or clear an error, our recourse is to use the 'Refresh' action located at the top of the page.

Microsoft is in the process of making certain adjustments to the error message formula associated with "TestField" and “Table Relation” (and possibly implementing other improvements). These changes are aimed at achieving the above two key objectives.


The following figures show an example of a “Testfield” property validation error in the 2023 release wave 2




Similarly, Table Relation property validation error in the 2023 release wave 1 and earlier.



Table Relation property validation error in the 2023 release wave 2.




Information in the Copy details section for Testfield:


If requesting support, please provide the following details to help troubleshooting:


Status must be equal to 'Open'  in Sales Header: Document Type=Order, No.=S-ORD101009. Current value is 'Released'.


Internal session ID:



Application Insights session ID:



Client activity id:



Time stamp on error:



User telemetry id:



AL call stack:

"Sales Line"(Table 37).TestStatusOpen line 15 - Base Application by Microsoft

"Sales Line"(Table 37)."Quantity - OnValidate"(Trigger) line 16 - Base Application by Microsoft