web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    236,394 Most Valuable Professional on at
    RE: What is the use of Table Write() method

    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
    RE: What is the use of Table Write() method

    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
    RE: What is the use of Table Write() method

    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
    236,394 Most Valuable Professional on at
    RE: What is the use of Table Write() method

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

  • Community Member Profile Picture
    on at
    RE: What is the use of Table Write() method

    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
    RE: What is the use of Table Write() method

    Hello,

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

  • Sohaib Cheema Profile Picture
    48,887 User Group Leader on at
    RE: What is the use of Table Write() method

    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
    236,394 Most Valuable Professional on at
    RE: What is the use of Table Write() method

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

  • Community Member Profile Picture
    on at
    RE: What is the use of Table Write() method

    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
    RE: What is the use of Table Write() method

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans