Skip to main content

Posts

Showing posts from December, 2017

How to change Company of Employee in Axapta by code

To change Company of Employee in Axapta by code you can get hint by below code. Its tedius task to update you need to do it very carefully and understand then code then apply in your customization. ttsBegin; hcmWorker=hcmWorker::findByPersonnelNumber(Personalumberid); select companyinfohsd where companyinfohsd.dataAreaId=="dat"; select companyinforss where companyinforss.dataAreaId=="ceu"; select forupdate hcmEmployment where hcmEmployment.Worker==hcmWorker.RecId && hcmEmployment.LegalEntity==companyinfohsd.RecId; hcmEmployment.LegalEntity=companyinforss.RecId; hcmEmployment.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction); hcmEmployment.doUpdate(); ttsCommit;

Insert Records in Item batch Table by code in Ax 2012

To Insert Records in Item batch Table by code in Ax 2012 you can take hints from below code. First, you need to check whether a record exists or not in the inventbatch table if it does not exist then you can insert records. if (InventBatch::exist(Itemid,Inventbatchid)) { //error("Batchnumber already exists"); } else { inventBatch.itemId=Itemid; inventBatch.inventBatchId=Inventbatchid; inventBatch.prodDate=mkDate(1,12,2017);//systemDateGet(); inventBatch.insert(); }

Product transaction cycle from Creation of item to sales , purchase and on hand in Ax 2012

By viewing below clip you will able to know Product transaction cycle from Creation of item to sales and purchase and on hand physical in Ax 2012. 1. How to create Item in ax 2012 and assign item group, tracking dimension etc 2.Create, confirm and post-purchase order in the system. 3.Create, validate and post-movement journal in the system. 4.Create, confirm and post-sales order in the system. 5. On hand effect checking on the item on each process against inventory dimension. Please visit and see the clip and subscribe on youtube to get more updates.