Uploading/creating records using UnitOfWork class

Public void copyRecordDetails()
    {
        DH_ProdLine                   ProdLine, ProdLineLoc;
        UnitofWork                      unitOfWork = new UnitofWork();
       
        ttsbegin;
        while select ProdLine
            where ProdLine.IMSVersionNumber == _Value
        {
            buf2Buf(ProdLine, ProdLineLoc);
            unitOfWork.insertonSaveChanges(ProdLineLoc);
        }
        unitOfWork.saveChanges();
        ttscommit;
        info("@MCR39743");
    }

Comments

Popular posts from this blog

On clicked event of form button in D365 X++

Finding unit price of item from trade agreement through code AX X++

Create Sales Line Through Code AX X++ D365 Finance & Operations