web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

What is the use of Table Write() method

(0) ShareShare
ReportReport
Posted on by

Hi All,

Can somebody explain the use of write method at table level.

Regards,

Nunna

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    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.

  • Jesus R. ABASCAL Profile Picture
    1,450 on at

    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

  • Community Member Profile Picture
    on at

    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.

    Regards,

    Nunna

  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    That's exactly what I've already answered. See the documentation by yourself.

  • Community Member Profile Picture
    on at

    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

  • Suggested answer
    fatihgork Profile Picture
    3,817 on at

    Hello,

    DMF imports are using it, also thats why DMF is missing validations

  • Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    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.

  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    write() calls insert() or update(), not the other way around.

  • Community Member Profile Picture
    on at

    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.

  • Community Member Profile Picture
    on at

    Thanks Martin for sharing information.

    Regards,

    Nunna

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans