Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: Change customer groups with X++

$
0
0

Hi MYGz,

Performance should be ok for 3.5K and take minutes, not hours. When you modify cust group from UI AX initialize tax group, payment terms and schedule from it, so if you want to have same behavior, then you need something like:

static void Job(Args _args)
{
    CustTable ct;
    CustGroup custGroup = CustGroup::find('110');
    
    ttsBegin;

    select forUpdate ct
       where ct.AccountNum=='FDA01';

    ct.CustGroup='110';      //Current CustGroup is '180' which is to be changed to '110'
    ct.initFromCustGroup(custGroup);
    ct.update();

    ttsCommit;
}



Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>