Difference between update() and doUpdate()?

What is the difference between Update and doUpdate() in X++?


it will bypass the functionality of Update()…

means it not chek the condition .it will update the record…

Hello Sathosh,

The doUpdate table method updates the current record with the contents of the buffer. This method also updates the appropriate system fields.

The doUpdate method should be used when the update method on the table is to be bypassed. Suppose you have overridden the update method of the table but sometime there is a situation when you don’t want the code written in the overridden update method to be executed and at the same time want any selected record of that table to be updated. In such situation you should call the table.doupdate() method instead of table.update() method.

Hi Rajendra,

Tnx for reply can you please explain it in more detailed. I mean where we will use it and how ?

thank you,

till now i didn’t ise this method but,i know that

In update() values stored in buffer then update the record with reference to RecID & doupdate() can directly update the record with out cheking the condisions and all.

if we want to select particular record with some conditons…then we use update() method.but In some situation we didn’t need to chek the condition,in that situation we use DoUpdate().

I don’t know how useful this information & am not sure this is exact process…cause am also new to DAX.


Rajendra and Shankar Dutt Sharma… [:)]