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

Notifications

Announcements

No record found.

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
    237,994 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
    237,994 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,443 User Group Leader 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
    237,994 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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans