Skip to main content

Posts

Showing posts from December, 2025

🔎 How to Get Line-wise Other Charges Tax Amount in D365FO (IGST / CGST / SGST)

 In many D365FO implementations (especially India GST projects), we often need: Line-wise Other Charges Tax Amount Split into IGST, CGST, and SGST For Posted Customer Invoice Lines (CustInvoiceTrans) By default, D365FO stores: Invoice Lines → CustInvoiceTrans Charges → MarkupTrans Tax → TaxTrans To get accurate charges tax per invoice line, we must follow proper table relation hierarchy. 📌 Table Relationship Structure CustInvoiceTrans → MarkupTrans → TaxTrans Relationship Logic: MarkupTrans.TransTableId == tableNum(CustInvoiceTrans) MarkupTrans.TransRecId == CustInvoiceTrans.RecId TaxTrans.SourceTableId == tableNum(MarkupTrans) TaxTrans.SourceRecId == MarkupTrans.RecId This ensures we fetch only Charges Tax , not Item Tax. 🧠 Business Requirement For each invoice line, we need: IGST Amount CGST Amount SGST Amount Converted to positive value (if negative) 💻 X++ Code – Line Wise Charges Tax Calculation Cus...

What is Entire Table Caching?

 Entire table caching means that Dynamics 365 F&O keeps a full copy of the table in memory (cache) instead of loading records one by one from the database. So, when the table is used, the system does not go to the database every time . It simply reads the data from the in-memory cache , which is much faster. When is Entire Table Caching used? It is best for: Small tables Parameter or setup tables Tables where data does not change very often Example: A table that stores configuration settings (like number sequences or default parameters) is perfect for entire table caching. Why use Entire Table Caching? Improves performance Reduces database calls Faster read operations

Difference Between a Temp Table and a Container

  1. Data Access & Speed Temp Table: You can create indexes , so data retrieval is faster , especially with large datasets. Works like a normal SQL table, just temporary. Container: Data is stored in a sequential list . No indexing → slower when working with many records. 2. Structure & Flexibility Temp Table: Can hold multiple fields , different data types, and behaves like a real table. Supports filtering, sorting, and joins. Container: Simple structure, stores values in a linear list. No ability to sort or join directly. 3. Passing to Methods Temp Table: Passed by reference → method receives the same table buffer. Efficient for large data. Container: Passed by value → container is copied every time it is passed. Slower and uses more memory for large data. 4. Use Cases Use Temp Table when: You need to handle multiple records . You need fast lookup using indexes . You want to sort,...

Difference Between refresh(), reread(), research(), and executeQuery()

  Difference Between refresh(), reread(), research(), and executeQuery() 1. refresh() It only refreshes the data already loaded on the form . It does not go to the database. It simply updates the form UI with the data that is already in the form cache. Example: If you change a field value in code and want the form to immediately show the updated value, use refresh() . 2. reread() It reads the current record again from the database . It does not refresh the grid/form automatically. It is used when you want the latest version of only the current record , not the whole list. Example: If another process updated the same record in the background and you want to load the latest values from DB, use reread() . 3. research() It re-runs the form’s existing query on the datasource. It keeps the existing filters, sorting, and ranges . It refreshes the data on the form based on the same query that is already applied. Example: If new records were ...