Posts

Showing posts from June, 2026

How to: Fix issues related to Intercompany chain and clean up broken inventory transcations

 For those who have worked in Intercompany SO-POs know it very well that sometimes users across different legal entities face challenges in IC SO and IC PO. Issues with qty, statuses of lines or statuses of headers, broken inventory transactions for which nothing can be done. Below is the script to fix the status on lines, the status on the header, and delete broken inventory transactions: static void Job1(Args _args) {     PurchLine purchLine,purchLineGB;     InventTrans inventTrans,inventTransGB;     InventTransOrigin inventTransOrigin,inventTransOriginGB;     SalesLine salesLine,salesLineGB;     SalesTable salestable,salestableGB;     PurchTable purchTable,purchTableGB;          void updateSO(inventTransId _inventTransId, SalesStatus _lineSalesStatus, SalesStatus _orderSalesStatus)     {         select forupdate salesLine where salesLine.I...

How to: Update the data in D365FO table in production environment

Image
 Did you ever wish that you could just update or delete some data in D365FO production with out custom script route. The way we had access to AX 2012 AOT tables. Of course it is not possible to do it in D 365 FO directly but I developed a small job which accepts some parameters to update/ delete the data in production environment directly.  THIS IS ONLY FOR SENIOR DEVELOPER who understands the D365FO table structure properly and understand the consequences of updating the data in prod. So Please use it with caution and check the result in an environment where Production copy exists. internal final class XXXDataOprerations {     /// <summary>     /// Class entry point. The system will call this method when a designated menu      /// is selected or when execution starts and this class is set as the startup class.     /// </summary>     /// <param name = "_args">The specif...

How to: Update 1 financial dimension of ledger dimension in D365FO in X++

 I received a request to update the cost center financial dimension for the posted GL transactions for the fixed asset depreciation journal. There was an issue with master data, and the default financial dimensions were corrected after the journal was posted.  Below is the job that I created to update the FD on the Ledger dimension using the default dimension .  public static void main(Args _args)     {         GeneralJournalAccountEntry          GeneralJournalAccountEntryUpd;         GeneralJournalEntry                 GeneralJournalEntryUpd;         AssetTrans                          assetTrans;         AssetBook                           assetBook;         Di...