Update records -> help-documentation is wrong?


I need to update a batch of records. I cannot use update_recordset since i need a join in my query.

I was searching help documentation of Axapta if i can find something.

I found this :

mk:@MSITStore:C:\Program%20Files\Navision\Axapta%20Client\Bin\AxDvgLangUs.chm::/X++_constructs/Data_Manipulation/Update/Update.htm which say :

Example 1


tts begin;


WHERE MyTable.name==‘Jane Doe’;

MyTable.amountMST += 100;

MyTable.AccountNum = 1050;


tts commit;

Selects the table MyTable for update. Any records with the name equal to Jane Doe are updated. The amountMST field has 100 added to its current value, and the AccountNum field is changes to account number 1050.

If you read explanation, this code can update multiple records.

I try a simple query like that and no it didnt work.

We have already not much documentation about Axapta, but the one with Axapta is wrong ? Whats the problem with this code?


Please note that ‘forUpdate’ keyword fetches records exclusively for updating purposes.

You might want to call ‘while select’ if you wish to update multiple records. ‘Select’ will fetch only one record at a time. You might call ‘next’ statement with Select. Personally I prefer while wherever possible.

Hope this helps,

Yes i know all that, but my point was that documentation said one thing that didnt work.

I dont like to update record one by one, i prefer to said when possible only one query to database.