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...
Introduction to X++ X++ is a high-level programming language designed for enterprise resource planning (ERP) systems and database applications. It combines object-oriented, application-aware, and data-aware paradigms to facilitate complex business process management and data manipulation. Key Features of X++ Classes : System Classes : Provide core functionalities, such as file handling, collections, and data manipulation. Application Classes : Manage various business processes specific to ERP systems. Reflection : Allows introspection of classes to dynamically access properties and methods at runtime. Tables : Access to Relational Tables : X++ allows direct interaction with database tables using syntax similar to SQL. Keywords : Includes keywords for data definition and manipulation, akin to SQL. Reflection : Supports introspection on tables for dynamic access to fields and methods. User Interface : Forms and Reports : X++ provides the ability to create and manipulate UI elements...