Category Archives: D365 Business Central
Don’t Just Delete, TRUNCATE: A Deep Dive into Blazing-Fast Data Clearing in Business Central
If you’ve worked with data in Business Central, you’ve undoubtedly used the DELETE or DELETEALL commands. They get the job done, but when you’re dealing with massive datasets ike clearing out old ledger entries, archived sales orders, or temporary import tables they can feel painfully slow. There’s a better, faster way. Let’s talk about the TRUNCATE TABLE command, the unsung hero of high-performance data purging. What is TRUNCATE TABLE? In simple terms, TRUNCATE TABLE is a SQL command that instantly removes all rows from a table. Unlike DELETE, it doesn’t log individual row deletions in the transaction log. It’s a bulk operation that de-allocates the data pages used by the table, which is why it’s so incredibly fast. In the context of Business Central, you can execute this command directly from an AL codeunit. Yes, it’s that simple. Calling the .TruncateTable() method on a record variable targets its corresponding table and empties it completely. TRUNCATE TABLE vs. DELETE/DELETEALL: What’s the Difference? This is the crucial part. Choosing the right tool is key to performance and data integrity. Feature TRUNCATE TABLE DELETE / DELETEALL Performance Extremely Fast. Operates at the data page level. Slow. Logs every single row deletion individually. Transaction Log Minimal logging. Fills the log with a single “deallocated page” entry. Heavy logging. Fills the log with an entry for every row deleted. Where Clause No. It’s all or nothing. You cannot add a filter. Yes. You can use SETFILTER or SETRANGE to delete specific records. Table Triggers Does not fire. No OnBeforeDelete or OnAfterDelete triggers are executed. Fires for each row that is deleted. Referential Integrity Can fail if a FOREIGN KEY constraint exists. Respects and checks constraints, potentially failing on related records. Resets Identity Seed Yes. The next record inserted will have the first ID in the series (e.g., 1). No. The identity seed continues from where it left off. Transaction Rollback Can be rolled back if used inside a transaction, but it’s still minimally logged. Can be rolled back, as all individual deletions are logged. When Should You Use TRUNCATE TABLE? Given its power and limitations, TRUNCATE TABLE is perfect for specific scenarios: A Real-World Business Central Example Imagine you have a custom “Data Import Staging” table. Every night, a job imports thousands of items from an external system. The first step is always to clear the staging area. The Slow Way (using DELETEALL): The Blazing-Fast Way (using TRUNCATE TABLE): The performance difference can be staggering, turning a minutes-long operation into one that completes in under a second. Critical Warnings and Best Practices With great power comes great responsibility. The limitations of TRUNCATE TABLE are not just footnotes—they are critical considerations. NO FILTERS! This is the biggest “gotcha.” You cannot use SETRANGE before calling TruncateTable(). The method will ignore any filters and always delete everything. Double and triple-check your code to ensure you are targeting the correct table. Bypasses Business Logic: Because table triggers do not fire, any essential business logic in the OnDelete trigger will be skipped. Do not use TRUNCATE TABLE on tables where the delete triggers perform critical actions (e.g., posting, ledger entry creation, validation). Using it on main transaction tables like “G/L Entry” or “Sales Line” is almost always a bad idea. Foreign Key Constraints: If another table has a foreign key constraint pointing to the table you’re trying to truncate, the command will fail with an error. DELETEALL would also fail in this case, but the error message might be different. To Conclude, TRUNCATE TABLE is a powerful tool that should be in every Business Central developer’s arsenal. When used correctly, it can dramatically improve the performance of data maintenance tasks. The Rule of Thumb: Use DELETEALL when you need to respect business logic, delete specific records, or work with tables that have complex relationships. Use TRUNCATE TABLE when you need to quickly and completely empty a large, standalone table where bypassing business logic is safe and acceptable. Embrace TRUNCATE TABLE for the right jobs and watch your large-scale data operations fly. Reference: https://yzhums.com/67343/, We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
GST Implementation Made Easy in Dynamics 365 Business Central
For any Indian business running on Microsoft Dynamics 365 Business Central, tax compliance isn’t optional, it’s foundational. The Goods and Services Tax (GST) framework is complex and manually managing it is a high-risk gamble. This guide isn’t just a list of steps; it’s your definitive blueprint for configuring Business Central’s powerful Indian localization features to handle GST seamlessly. We will transform your ERP from a standard ledger into a fully automated, compliance-ready machine. Ready to banish tax-related data entry errors and audit anxiety? Let’s dive in and set up the system correctly, from defining your GSTINs to mastering the G/L posting matrix. Microsoft Dynamics 365 Business Central offers robust localization features for India, including comprehensive support for the Goods and Services Tax (GST). Properly configuring GST is essential for calculating, recording, and settling taxes on all your inward and outward supplies, ensuring compliance with Indian tax laws. This guide provides a straightforward, step-by-step process for setting up GST in Business Central, based on Microsoft’s best practices. Phase 1: Laying the Foundation (Tax Periods & Registration) The initial phase involves setting up the legal and temporal frameworks for your GST configuration. Step 1: Define Tax Accounting Periods (GST Calendar) The GST regime operates on a specific timeline, and you need to define this within Business Central. Step 2: Establish Your GST Registration Numbers (GSTINs) Your Goods and Service Tax Payer Identification Number (GSTIN) is critical for identifying your tax entity and the state you operate in. Phase 2: Core Configuration (G/L Accounts and Masters) This phase links the statutory requirements with your company’s general ledger structure. Step 3: Configure GST Groups and HSN/SAC Codes These setups classify your goods and services for accurate rate calculation. Step 4: Define the GST Posting Setup (The Accounting Link) This is perhaps the most crucial step, as it determines which General Ledger (G/L) accounts are used to post GST amounts. Step 5: Set Up GST Rates With your Groups and HSN/SAC codes defined, you now specify the actual tax percentages. Phase 3: Master Data Integration (Connecting the Dots) The final phase ensures that your business entities and locations are linked to the defined GST rules. Step 6: Update Company and Location Information Your company’s primary details must be GST-compliant. Step 7: Configure Customer and Vendor Master Data For every trading partner, you must define their GST status and registration details. To conclude, by following these seven steps, your Indian company’s Business Central environment will be fully configured to handle GST calculations automatically. This setup allows the system to determine the correct tax component (CGST, SGST, or IGST), apply the right rate, and post the amounts to the designated G/L accounts, simplifying your day-to-day transactions and preparing you for GST settlements and reporting. I Hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
Workspaces in Business Central AL Explained
When developing in Microsoft Dynamics 365 Business Central, you spend a lot of time working in Visual Studio Code. To streamline productivity and keep projects well-organized, workspaces in Business Central AL play a critical role. In this blog, we’ll explore what workspaces are, why they matter, and how you can use them effectively in your AL development journey. What is a Workspace in Business Central AL? A workspace in Visual Studio Code is essentially a container that holds your project’s structure, settings, and configurations. In Business Central AL development, a workspace defines: In short, a workspace ensures that everything needed to build and deploy an extension is neatly bundled together. Benefits of Using Workspaces Creating and Managing Workspaces Tip: Save your workspace using File > Save Workspace As… so you can reopen it quickly in future. Example: Multi-root Workspace When working with multiple extensions in a workspace, handling dependencies used to mean installing each required app one by one. Now, the development environment can automatically look at the dependency graph in your workspace and publish the necessary projects along with the one you selected. This way, you can focus on building and testing without worrying about missing dependencies. Imagine you’re working with multiple extensions in your Business Central environment: From the diagram: Base App ALProject1 ALProject2 ALProject3 Adding Folder to Workspace. Saving Workspace. Creating a separate folder to store workspaces. Publishing Full Dependency. This allows you to debug, build, and manage all the extensions from a single VS Code instance. Best Practices for Workspaces To conclude, workspaces in Business Central AL are more than just folders — they are the foundation of your development environment. By structuring your projects with well-maintained workspaces, you ensure smoother collaboration, better organization, and efficient extension deployment. If you’re just starting with AL, experiment with single-project workspaces, and as you grow, explore multi-root setups to manage larger development scenarios. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
Rethinking Permissions in Business Central: From Afterthought to Strategic Asset
In conversations with Business Central customers, one recurring theme stands out: permissions remain the single biggest operational pain point. For too long, organizations have taken the path of least resistance: The outcome? A fragile balance where security is compromised, efficiency is slowed, and compliance becomes an afterthought. But permissions should not be a roadblock. They should be a strategic enabler. Moving Beyond “Access” to “Enablement” Business Central has quietly matured its security model. The challenge is not capability, but mindset. Organizations must move from access as convenience to permissions as governance. Here are three levers that shift permissions from problem to advantage: Why This Matters for Leaders Strong permissions are not an IT housekeeping task—they are a strategic safeguard: The Leadership Imperative To conclude, Business Central leaders must stop viewing permissions as a technical nuisance. In an era of increasing scrutiny on data security and compliance, permission architecture is leadership architecture. The organizations that invest in this today will not only reduce risk but also unlock smoother onboarding, faster adoption, and a culture of accountability. If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com. It’s time to replace the culture of SUPER users with a culture of super governance.
Share Story :
Adding Task Dependency & Auto-Forecasting in Business Central – A Client Story
As a Business Central functional consultant, I often come across clients who want to stretch the system just a little further than what the standard product offers. And honestly? That’s the fun part of my job, taking a real business problem and making Business Central work for it. Recently, one of our clients came to us with an interesting ask. They were using Projects in Business Central (note: not full-blown Project Operations, since BC’s project functionality is more limited) just to track their internal projects. For them, it wasn’t about billing customers or external reporting, it was about managing their own internal tasks in a structured way. But soon, they hit a snag: “We want task dependencies. Unless Task A is done, Task B should not be editable. And while we’re at it, can we also forecast task timelines automatically?” The Customization: Task Dependency + Forecasted Dates We built a customization with two powerful features: This combination turned their static task list into a dynamic project plan inside Business Central. Why This Feature Made a Big Difference Here are a few ways it improved their day-to-day working: A Small Customization, A Big Win Sometimes, it’s not about adding a huge new module, it’s about adding the right control and visibility at the right place. This customization gave our client confidence that their internal projects would stay on track, with dependencies and timelines automatically adjusting in Business Central. And that’s the beauty of Business Central: it gives you a strong foundation, and with a little tailoring, it can adapt perfectly to your unique business needs. I Hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
Microsoft Dynamics 365 Business Central: The Future of Mid-Market ERP Growth
Microsoft Dynamics 365 Business Central: The Future of Mid-Market ERP Growth The ERP market is undergoing a fundamental transformation, and Microsoft Dynamics 365 Business Central (BC) is at the center of this evolution. Once perceived as a mid-market ERP solution, BC has rapidly matured into a powerful, cloud-first platform capable of supporting not just small businesses but also larger enterprises looking for agility, scalability, and deep integration. The Growth Story Business Central has experienced unprecedented growth over the past few years. Today, it powers more than 45,000 organizations worldwide, doubling its customer base in less than three years. Equally impressive is the growth in active users, which has risen by more than 75% year-on-year, with a particularly strong uptake among organizations with over 100 users—showing BC is no longer just an SMB tool. Microsoft’s investment in global expansion has also paid dividends. With localization support across 160+ countries, BC has become a truly international solution, making it the go-to ERP for businesses seeking consistency across geographies. Drivers Behind the Momentum Several factors are fueling this surge in adoption: A Strategic Shift in Customer Profile What’s particularly notable is the rapid growth of larger customers adopting BC. The number of customers with 100+ paid users has grown by more than 100% year-on-year. This shift highlights BC’s ability to scale and compete directly with larger ERP players traditionally serving the enterprise segment. The Challenges Ahead Despite its growth trajectory, Business Central faces challenges: The Road Ahead Looking ahead, Business Central is poised to play a leading role in shaping the ERP landscape. Its cloud-native architecture, combined with Microsoft’s innovation in AI and global reach, positions it as the ERP of choice for mid-market businesses scaling rapidly—and even for enterprises seeking agility. In many ways, BC represents more than just an ERP system; it’s a strategic growth enabler. By embedding intelligence, integrating seamlessly with the Microsoft stack, and offering flexibility through partners, Business Central is proving that the future of ERP is not just in the cloud—it’s intelligent, scalable, and accessible. To conclude, the story of Business Central is a story of transformation—of ERP systems, of business models, and of organizations embracing agility. For leaders looking ahead, BC is not just a software choice; it’s a growth strategy. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
Preview and Download Selected Documents as PDFs in Business Central Using AL
In Microsoft Dynamics 365 Business Central, users frequently need to generate and review Purchase Order (PO) documents. Traditionally, this process involved downloading PDF files locally and then opening them with an external PDF viewer. While functional, this workflow can be inefficient, especially when reviewing multiple purchase orders. With recent enhancements in the AL language and web client capabilities, it is now possible to preview PDF documents directly within the browser, eliminating unnecessary steps and improving user experience. Additionally, Business Central continues to support direct file downloads for scenarios where saving a copy locally is required. This article presents a customization to the Purchase Order List page, allowing users to select multiple purchase orders and either preview or download their PDF documents using AL code. Functional Overview The proposed solution introduces a new action on the Purchase Order List page titled “Preview Selected Purchase Orders”. This action performs the following tasks: Role of Report Selections Report Selections play a vital role in ensuring flexibility and modularity. Instead of hardcoding specific report IDs, the system determines the report to be used for each Purchase Order based on vendor configuration. Example AL Snippet: This method respects configurations made in the Report Selection – Purchase page, allowing different vendors to use different report formats or layouts for the same document type. AL Implementation Below is the complete AL code for the pageextension object: File Handling Options: Preview vs Download Depending on business needs, developers can choose between two methods: 1. File.ViewFromStream 2. File.DownloadFromStream Output This customization provides two ways to handle PDF outputs for Purchase Orders: 1. For a Single Selected Document When a single purchase order is selected and the action is triggered: 2. For Multiple Selected Documents (Merged into One PDF) Business Benefits To Conclude, by leveraging AL capabilities such as Report Selections, Temp Blob, and the File data type methods, developers can significantly enhance document handling processes in Microsoft Dynamics 365 Business Central. Offering both in-browser preview and direct download options provides users with flexibility and improves overall productivity. This customization is a practical example of how small enhancements can deliver substantial value in day-to-day business operations. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
How to Change Posting Number Series in Business Central: Configuration and Customization Guide
In many businesses, especially those involved in international trade, it’s common to handle both import and export transactions. To keep records clean and compliant, companies often want to assign separate posting number series for exports and imports in Microsoft Dynamics 365 Business Central. In this guide, we’ll walk you through how to configure and automate posting number series selection based on the sales order type Export or Import helping your business maintain accurate and organized documentation. Business Scenario: A customer requires that: When a Sales Order is created for EXPORT, a specific Export Posting No. Series should be applied. When a Sales Order is created for IMPORT, a different Import Posting No. Series should be used. This allows for easy tracking, filtering, and compliance with customs or internal auditing processes. Steps to achieve goal Step 1: Create Two Posting Number SeriesGo to “Number Series”. Create two new series: SO-EXP-2025 → for Export SO-IMP-2025 → for Import Set appropriate starting numbers, prefixes, and increment-by values. And then create another No series for Sales Order relationship S-ORD-R add above no series in relationship in Sales & receivable setup add the new S-ORD-R Step 2: Create a field add field in page extension and table extension of No series Line. Step 3: Add Logic in the Sales Order Page ExtensionIn your Sales Order page extension, implement logic to check if the selected No. Series is tagged as “Export”. If so, automatically assign the corresponding value from the “Posted No. Series Code” to the “Posting No. Series” field on the Sales Order. This ensures that when an Export-related number series is used, the correct posting series is set without manual intervention. To conclude, setting different posting number series based on whether a Sales Order is for Export or Import is a simple yet powerful customization in Business Central. With a small extension or logic-based workflow, you can automate this process to enhance control and compliance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
Work Smarter, Not Harder: Use Copilot to Summarize Records in Dynamics 365 BC
With the 2025 Wave 1 release, Dynamics 365 Business Central becomes even more user-friendly thanks to a smart new feature powered by Copilot: Summarize a Record. This feature allows users to instantly view a plain-language summary of key records, such as customers, vendors, items, and sales or purchase documents. Instead of clicking through multiple tabs or analyzing raw data, you now get a clear, AI-generated overview in seconds. The Summarize with Copilot action reviews all relevant data from a record and provides a quick summary in natural language. Steps to use this feature:Open a supported record (e.g., a customer or sales order). Click on “Summarize with Copilot” which is on right side. Copilot instantly generates a readable summary based on available data. This works seamlessly across environments where Copilot is enabled and enhances the way you interact with Business Central data. To conclude, summarize a Record with Copilot is a perfect example of working smarter, not harder. Whether you’re preparing for a customer call, reviewing a vendor, or checking on an item, this feature gives you quick context without the clicks. It’s one more step toward making Business Central faster, simpler, and more intelligent just like modern business software should be. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
Share Story :
Struggling to Bulk Upload “Item Revaluation Entries”? Here’s What Could Be Going Wrong
In this blog, one of our clients had made some small mistakes while providing the data for their opening balances, which caused the item costs to be wrong. After a lot of back-and-forth, we finally got a list of 100+ items with the correct costs. We thought it would be easy to fix using Edit in Excel but then we ran into an error:“Quantity must have a value in Item Journal Line.” But this is odd as when we are creating the entries manually, we don’t need to set the Quantity from anywhere. In fact, the Quantity field isn’t even editable, it is populated when the “Applies-to Entry” field is updated. We tried using Configuration Package.. same thing! We tried to create an excel import, that uploads data in the journal.. same thing! So what’s going on? Details After a bit of debugging we found this piece of code to be the problem – And this -> When you update the “Unit Cost (Revalued)” field in Business Central, it also updates the “Inventory Value (Revalued)” field automatically. This part is simple. But the system also tries to update “Unit Cost (Revalued)” again based on the value you just changed—almost like it’s going in circles. To avoid this, the system checks which field is currently being updated. If it’s not “Unit Cost (Revalued)”, the update is allowed. When you make changes from the Business Central screen, the system knows which field you’re changing, thanks to something called CurrFieldNo. But when you use Edit in Excel, Config Packages, or AL code, this info is missing. That confuses the system and can cause it to divide by zero, which leads to an error. Also, there’s a rule that checks quantity in the “Applies-to Entry” field. This check only happens if the “Value Entry Type” is not set to “Revaluation”. This was raised back in 2018 on Github as a bug but it was closed as intended system design. At the end, we had to bypass the validation and assign the values directly to the fields. To conclude, what seemed like a simple task updating revalued costs turned into a deep dive into Business Central’s internal logic. The issue stemmed from how the system handles field updates differently depending on the entry method. While the manual interface sets background values like CurrFieldNo to help Business Central track changes properly, external methods like Edit in Excel or Config Packages don’t provide that context. If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com.
