Friday, 7 March 2014

How rename the record in Ax2012?

we are using right click on record and use record information for renaming record.
Following job use to rename the record .

static void CustomerAccountRename(Args _args)
{
     CustTable custTable;
    select firstOnly custTable
          where custTable.AccountNum == '1101';
          if (custTable.RecId)
         {
                 custTable.AccountNum = '1101_';
                 custTable.renamePrimaryKey();
          }
}

No comments:

Post a Comment