Hi everybody,

I want to update selected records on grid, and refresh the results. This is
the code :


ttsBegin;
for (MyTable= MyTable_ds.getFirst(true) ? MyTable_ds.getFirst(true) :
MyTable_ds.cursor();
        MyTable;  MyTable = MyTable_ds.getNext())
    {


        SELECT FORUPDATE MyTableUpdate
        WHERE MyTableUpdate.RecId == MyTable.RecId;

        MyTableUpdate.Qty = newQuantity;
        MyTableUpdate.update();

        *MyTable_ds.refresh();*
     }
ttsCommit;



Update is working correct but ds.refresh() only refresh the last selected
record. How can update all of the selected records without lost the marking.
I use ds.executeQuery(), it works but I lost selected records and cursor
goes to first record of the grid.

This is very important for us. I will really appreciated, if anyone can
solve this problem.

Best regards,

Anil Ozay
MVP Dynamics AX, Software Engineer


[Non-text portions of this message have been removed]

Reply via email to