9 Jul 2014

Copying data of one table to another table across the company in AX

//Copying data of one table to another table across the company in AX2009


static void CopyData(Args _args)
{
    TableA                  tableA;
    TableB                  tableB;
    DataArea                dataArea;

    ;

  while select dataArea
     {

        changeCompany(dataArea.id)
        {
            tableA= null;
            tableB= null;
            while select tableA
            {
              tableB.CustAccount        = tableA.CustAccount;
              tableB.ItemCode           = tableA.ItemCode;
              tableB.insert();
            }
        }
     }

      info(strfmt("Mission Accomplished"));

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...