FormDataSource.Modified method

Hi,

I am quite unsure about the concept of FormDataSource.Modified(). From the MSDN Developer help of AX, i found below notes on it:

"Modified means that the value of the field on the current record has changed, but the value is not written to the database before saving the record. "

So, after reading above lines i have a regarding when will this change will be save to database?

while i am changing anything in any field, its modified() is called immediately. If this keeps the changes temporerily then when it finaly saves the changes to DB? (on the form Closing ?? )

Please give me short description.

Thanks in advance.

hi ashlesh,

once i checked this scenario…

two things changed(updated) the database

  1. explicitly click the save button

  2. close the form (update happens when closed the form)

so i think modified didnt change the Database…it only updated on the datasource…when we close or click the save buttton the changes updated from datasource to database.

thanks & regards

axxxapta

Good Question…

See…when u r writing on any of the field on the form ,it doesn’t mean that after saving only the data will copy to database.

Concept is, the form and controls of the form are only for interfacing to the user.wat ever u r writing on the form its simultaneously writing on the table**,(means u can say u r writing on the table only)**

after saving it stores in database or we can say in Table.

Still if any doubt ,ping me at jagadis.sahu@gmail.com

Hi Ashlesh

Actually when ever we make changes on a field modify methods calls, but after that a validate field,validate write method at table level calls . Those methods do the working of Data Saving in DB…

Thanks and Regards

Varun Garg

Hi,

And the other possible way is to change the record in SalesTable grid. All the time it fires write() method of the SalesTable formdatasource.

I got the thing where i am required to append my logic.

Thanks to everyone.