Axapta : Find for update

ปกติจะ update ทีนึง ก็ใช้ select forupdate เพิ่งรู้ว่าทำแบบนี้ได้ด้วย
ใช้ static method ที่ชื่อ find ซึ่ง table ส่วนใหญ่จะมีอยู่แล้ว แล้วก็ใส่ parameter forupdate เป็น true

static void FindForUpdate(Args _args)
{
EmplTable myRow;
;
ttsbegin;
myRow = EmplTable::find('0154-3',true);
myRow.Name ='Nikom';
myRow.update();
ttscommit;
}

Comments

Popular posts from this blog

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

ใต้ร่มกาสาวพัตร