Hi All,
Can somebody explain the use of write method at table level.
Regards,
Nunna
*This post is locked for comments
A quote from documentation: "Updates a record if it exists; otherwise, inserts a record". It's useful in some cases when you don't know whether a record is being inserted or updated.
Write method is used on forms data source to insert or update records to database. The difference is that write calls validatewrite method. Insert method being on the table inserts records into the table. So, in form use Write and in tables use Insert.
Calling sequence in data source : validatewrite >> write >> insert or update
Hi Martin,
Thanks for the reply,
Can you please tell the use of Table Write method as well, (Not Datasource write()).
I am using AX 2012 R3.
That's exactly what I've already answered. See the documentation by yourself.
Yes it stated same,
But if I keep the break point in that method, it's not hitting while inserting/ updating.
Hence I assume, this method will not hit while insert/ update, Can you tell me why debugger is not hitting
Hello,
DMF imports are using it, also thats why DMF is missing validations
there can be other reasons if debugger is not going there inside.
what martin told you, is correct.
msdn.microsoft.com/.../aa569665.aspx
blaming write() method for 'Debugger not working' is not correct.
write() calls insert() or update(), not the other way around.
Hi Sohalib,
Even I too agree with marin, Since it is there in Documentation.
But Form data source write() method is hitting, then what might be the debugger issue to not hit in table write method.,
And also I have written info statement in table write method, I didn't info message as well while update/insert. So it's clear that table write() method will not while insetting or updating record, and I just want to know when this method will get execute.
Thanks Martin for sharing information.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 4
Martin Tocauer 4
Nayyar Siddiqi 2