Posts

Showing posts from September, 2025

Document Attachment with Item Journal Table in Business Central

Image
Business Central already provides the Document Attachment framework, but sometimes you need to extend it to work with additional tables. In this blog, I’ll show you how I extended the Document Attachment functionality to support the Item Journal Line table. By the end, you’ll be able to attach documents (like invoices, PDFs, or scanned files) directly to item journal lines and view them from the journal page. Step 1: Extend the Document Type First, extend the Document Type in the Document Attachment table to include a new option for Item Journal . This makes it possible to tag an attachment specifically for an item journal line. enumextension 50500 "Attachment Dc" extends "Attachment Document Type" {     value ( 50500 ; "Item Journal" )     {         Caption = 'Item Journal' ;     } } Step 2: Add Template Name and Batch Name Fields The standard Document Attachment table doesn’t store the  Template Name  and ...

How to fixed Sales Order OData V4 Ship-To / Bill-To Errors in Business Central

Image
How to Fix Sales Order OData V4 Ship-To / Bill-To Errors in Business Central When integrating with Microsoft Dynamics 365 Business Central through the OData V4 API, I ran into a problem while creating Sales Orders with Ship-To addresses . Sales Orders without Ship-To or Bill-To information were created without any issues. However, as soon as I tried to include a Ship-To address as an Alternative Shipping Address , the API returned errors. After some investigation, the solution turned out to be a very small but important change in the page extension. Problem I was posting a Sales Order using the OData API and included Ship-To fields in the payload: { "Document_Type": "Order", "Sell_to_Customer_No": "10000", "ShipToOptions": "Alternate Shipping Address", "Ship_to_Code": "0009" } Instead of processing the request, Business Central returned errors such as: Form.RunModal is not allowed in write tra...

Edit in Excel Feature in Business Central – Required Permission

Image
Hello Folks, Microsoft provides the Edit in Excel feature in Business Central, which allows users to easily export data to Excel, make edits, and then publish those changes back into Business Central. However, for this feature to work correctly, the user must have the proper permissions assigned. Without them, you may face issues like blank data or login errors. Step 1: Export Data from Business Central Go to the Customer List page. Click on the Edit in Excel button as shown below. Step 2: Open the File in Excel Once the file is downloaded, open it in Excel. If the user doesn’t have sufficient permissions, the data will appear blank . You might also get a login error message like the one below: Step 3: Check User Permissions in Business Central Open the User Card of the affected user in Business Central. In this example, the user already has certain permission sets assigned, but it’s not enough for Edit in Excel. Step 4: Add the Required Permission Set Assign ...

Multi-Level Approval Workflows in Business Central

Image
Multi-Level Approval Workflows in Business Central Their requirement looked like this: Sales Order Approval Flow : First approval → Sales Managers (any one of them can approve) Second approval → Finance Managers (any one of them can approve) Final approval → Director (only one user, final approver) What is Multi-Level Approval in Business Central? In Business Central, multi-level approvals are managed through Workflow User Groups . Sequence No. (1, 2, 3, …) → defines the order of approvals. Multiple users in the same sequence → means approvals happen in parallel for that sequence. Standard BC logic → all users in a sequence must approve (AND logic). If you need any one user to approve (OR logic) , a customization may be required. Step-by-Step Setup 1. Create a Workflow User Group Go to Workflow User Groups in Business Central. Add approvers with the correct Sequence Numbers . Example setup: Seq 1 → Sales Managers (2 users, either can approve) Seq 2 ...

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

Image
In Business Central, when you open a page (like the Customer List ), you usually see a + New button and a Delete action at the top. These allow users to create new records or delete existing ones directly from the list. However, in many businesses, you may want to restrict users from creating or deleting records. For example, you might allow users to view or edit existing records but not create or remove them. This can be controlled using the InsertAllowed and DeleteAllowed properties in a page extension. For Example, we can check in customer list page it's showing +new and Delete button. Example code: pageextension 50501 "Customer Card DC" extends "Customer Card" {     InsertAllowed = false ;     DeleteAllowed = false ; } After publishing this extension: The + New button hide. Users cannot create or delete customers. They can still open and edit existing records (unless you also set ModifyAllowed = false ). So basically: with a few ...