Axapta : Find for update

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

1
2
3
4
5
6
7
8
9
10
static void FindForUpdate(Args _args)
{
    EmplTable myRow;
    ;
    ttsbegin;
    myRow = EmplTable::find('0154-3',true);
    myRow.Name ='Nikom';
    myRow.update();
    ttscommit;
}

Written by Komkid on December 8th, 2009 with no comments.
Read more articles on Axapta and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:

You have to be identified to write a comment.