Axapta X++ buf2Buf copy record ,Copying table records to duplicate table

static void buf2Buf_Example(Args _args)
{
    //Updating by buf2Buf()

    SourceA     source,
                destination;
    ;
    source.number   = 1;
    source.fieldA   = 'xxx';
    source.fieldB   = 'yyy';
    source.fieldC   = 'zzz';
    destination     = sourceA::find(1,true);

    ttsBegin;
        buf2Buf(source, destination);
        if (!destination.validateWrite())
            throw Exception::Error;
        destination.update();
    ttsCommit;
    info('done');



 
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

เริ่ม ต้นเขียนโปรแกรมกับ กับ X++

date Functions Axapta X++