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();        }     
Microsoft Dynamics Ax,AIF,Axapta, Enterprise portal,,Microsoft , United State,U.S., SharePoint , BI Tools, Performance Tuning, SSRS,Business Logic,Ax ERP Errors and solution,Dynamics 365 Errors Solution,Business software .