Posts

Business Central XmlPort: Why the XML Declaration Looks Missing

Image
I have read this doubt somewhere: “My XmlPort is exporting XML correctly, but the header <?xml version="1.0" encoding="UTF-8"?> seems to be missing.” At first glance, it looks like Business Central is not generating the declaration — but in reality, it’s more about how the file is viewed. Properties of XMLPORT: If you open the file in Edge or any other browser , you will not see the line <?xml version="1.0" encoding="UTF-8"?>. If you open the file in Notepad , you will be able to see the <?xml version="1.0" encoding="UTF-8"?>. 🔍 Why It Looks Missing When you open the XML in a browser (like Edge or Chrome), the browser parses the XML and hides the declaration , showing only the structured nodes. When you open the same XML in a text editor (like Notepad), the header becomes visible because the editor shows the raw file content. So the XML declaration is there , but browsers simply don’t display it...

How to Hide the +New and Delete Action Buttons in Business Central Pages

Image
In Business Central, the Customer List page shows a + New & Delete action  at the top. This allows users to create new & delete customer records directly from the list.  In some cases, businesses may want to restrict users from creating or deleting records on certain pages. For example, you may want users to only view or edit customers but not add or remove them. This can be achieved by using the InsertAllowed and DeleteAllowed properties in a page extension . Code: pageextension 50102 CustomerExtension extends "Customer Card" {     InsertAllowed = false;     DeleteAllowed = false;     layout     {     } } 👉 Once this extension is deployed, the  + New  button will no longer appear on the Customer List page for any user. Result: The + New button will no longer be visible on the Customer Card page. Users cannot create new customers or delete existing ones. They can still view and edit existing records (un...

Background Posting of Sales Orders with Job Queues in Dynamics 365 Business Central

Image
In Microsoft Dynamics 365 Business Central, posting can sometimes take a while if you process documents one by one, especially during busy periods. To improve efficiency, you can use batch posting and background posting . Batch Posting → lets you post multiple documents (like sales invoices, purchase invoices, or warehouse shipments) at the same time. Instead of opening each document and posting it individually, you can select several and process them together. Background Posting → ensures the posting happens behind the scenes using the Job Queue functionality. That means you don’t have to wait while the posting runs; you can continue working on other tasks. Once the job queue processes the entries, you’ll see the results. In this Blog We will Cover Background Posting. Configure Sales & Receivables Setup Go to Sales & Receivables Setup . In the Background Posting section, enable “Post with Job Queue” . Select Job Queue Category  To print sales documents when posting, t...

Block Reason Field in Business Central (and How to Show it on the Item Card)

Image
The Block Reason field in Business Central is an explanatory note linked to the Blocked status on Items. It helps teams  document why something is blocked , improving communication and reducing confusion when Item are not visible in the Transaction Documents. The Block Reason is already available on the underlying table. If you don’t see it on the  Item Card , you just need to  surface it on the page —either with  Design/Personalize  or with a small  AL page extension . No-code:  Design/Personalize  (quickest) Go to  Settings ▸ Personalize  (or  Settings ▸ Design  if you’re in a sandbox with page design enabled). Click  + Field  /  Field  to open the available fields pane  Search for Block Reason .  Drag & drop the field to the desired FastTab (usually near Blocked on the General tab). If prompted, unlock the field (it’s a normal text field; “unlocked” here just means it isn’t a locked ...

How to Add a Hyperlink to a Role Center in Business Central

Image
Sometimes, you may want to quickly add a button on the Role Center page that opens an external website (e.g., company portal, Microsoft docs, etc.). This can be done by extending the Role Center and adding a custom action that uses the Hyperlink system function in AL. Code Example  Codeunit codeunit 50100 URLDisplay {     trigger OnRun()     begin         Hyperlink('https://www.microsoft.com/en-us/dynamics-365/products/business-central');     end; } Page extension pageextension 50100 MyExtension extends "Business Manager Role Center" {     actions     {         addbefore("Sales Quote")         {             action(AddHyperlink)             {                 Caption = 'URL Display';                 ApplicationArea = All;     ...

Add Custom Reports in the Reports & Analysis Page

Image
 The Reports and Analysis (Role Explorer) page is a system page → you can’t extend it directly . The supported way is to extend the target Role Center (e.g., Business Manager, Accountant, etc.) and add your custom report actions (or a custom Part) there. Those actions then show up in the Reports & Analysis area the button opens. In this example, I created a pageextension object to extend the Business Manager Role Center so that I can surface my own reports on the dashboard. Inside the extension, I used the actions block with addlast(sections) to insert a new group called Customer Report under the Role Center’s Reporting area. Within this group I defined two actions , one pointing to the standard Customer - List report and the other to the Customer - Top 10 List report. Each action has a caption, an icon, and a RunObject property that links it to the actual report object. Once published, this extension adds a Customer Report group in the Reporting tab, and those acti...

3 Ways to Specify Posting Periods in Dynamics 365 Business Central

Image
1. Company-wide posting periods Search for General Ledger Setup and open it. On the General Ledger Setup page, enter the dates in the Allow Posting from and Allow Posting To fields. 📖 Example: If you set: Allow Posting From: 01/07/2025 Allow Posting To: 31/07/2025 Only transactions within July 2025 can be posted. These posting periods apply to the  entire company  and to  all users . 2. User-specific posting periods If you want exceptions for certain users (like accountants who need to post adjustments in earlier periods), you can define posting periods at the user level . Search for User Setup and open it. On the User Setup page, define Allow Posting from and Allow Posting To dates for individual users. These user-specific posting periods override the dates in General Ledger Setup . 📖 Example: If the General Ledger allows posting for July 2025, but you set Allow Posting From: 01/08/2025 for User A, they can’t post in July . 3. Journa...