Update during modified field action - problem

hi,

I use ax 2009. On form in AX I am modifing field. AX is triggering modified field method on table. After super() I am doing update on this record:

contactPerson.selectForUpdate(true);

contactPerson.update();

After this action on form I have old value for field. I have to refresh form to see new version.

How should I do update to see new value for fields?

regards,

Jacek

Override Modified method of that particular Field from Form Datasource.

In the modifed method after super() write

DatasourceName_ds.research(true);

modifiedField() is not related to any saving to database, it’s triggered when a field value is updated (the record may be, but doesn’t have to be saved later). That’s also why you shouldn’t update any related records, because the current records haven’r been saved yet.

Use modifiedField() to set values to the current buffer, i.e. this, and they will be shown in forms automatically. Don’t touch any update() method there.

can u tell me the difference if we write super() method before and after the code…

coz wenever i ask my teacher dey told me to do dis…but after doing dis i didnt find any difference

If you call super() in methodA(), it calls methodA() in a base class. Let’s write it down as base.methodA().

Then the difference between:

super()
methodB()

and

methodB()
super()

is exactly the same as between:

base.methodA()
methodB()

and

methodB()
base.methodA()

It’s all about the order of method calls.