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)

RecordInsertList can't skip table's insert method

(0) ShareShare
ReportReport
Posted on by 170
I have a problem in Ax2009 , in posting sales orders.
When I want to post the sales order, in the "Class\SalesFormLetter\ recordInsertListInsert" method the "recordInsertSalesParmTable.insertDatabase();" line gets into the SalesParmTable's insert method. But the initialization of the recordInsertList is as
"recordInsertSalesParmTable = new RecordInsertList(tablenum(SalesParmTable),true);"
 
The 2nd parameter is "skipInsertMethod" and the value is true but when debug the code I saw that code entered the insert method of SalesParmTable.
 
Is this a bug for Ax2009? There is no development on these methods, they are original.

 

*This post is locked for comments

I have the same question (0)
  • Randi Haaland Profile Picture
    25 on at

    I'm having the same problem as described above and I'm wondering if you were able to solve it?

  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at

    I believe (although I'm not sure) that skipInsertMethod means

    "don't fall back to record-by-record inserts due to overriden insert()"

    rather than

    "don't call insert() at all".

    So if a record-by-record insert is being performed (because of AOSValidation or so), insert() is called normally.

  • Suggested answer
    Community Member Profile Picture
    on at

    Have you developed something for making the posting?

    Postings with the SalesFormLetter* classes must be run on server-side and not on client-side... so have you made sure to initialize and run the posting on server-side?

  • Randi Haaland Profile Picture
    25 on at

    Nothing has been developed in this part. We were however able to solve this by removing all databaselogging that was set up. I'm not sure if this table was logged.

  • Tony DePalo Profile Picture
    535 on at

    I am having the same problem but in AX 2012. When I run the purchInvoice process in X++ the insert() is not called, however, when the code runs in CIL the insert() is called.  I have raised this in a Microsoft service request,  Any other suggestions

    Thanks

    Tony

  • Saurabh P Singh Profile Picture
    890 on at

    To improve performance of certain processes, Microsoft Dynamics AX sometimes uses the following set-based operations:

    delete_from

    update_recordset

    insert_recordset

    These operations delete/update/insert multiple records in one trip to the database instead of making one call per record. Microsoft Dynamics AX does this only when the delete/update/insert methods of the table is not overwritten. For example, if you use delete_from but you have overwritten the delete() method on the table for which you are deleting records, Microsoft Dynamics AX will revert to a record by record delete instead of a set-based operation.

    To counter this, you can call a number of skip* methods:

    common.skipDataMethods(true) will skip the insert/update/delete methods

    common.skipDeleteMethod(true) will skip the delete method

    common.skipDeleteActions(true) will not execute the delete actions

    Also remember that this will only work if you are doing set-based operations, if you use the skipDeleteAction(true) method in combination with the delete() method, the delete actions will still be executed. The skip* methods are only taken into account when you use a set-based operation such as delete_from.

    Extracted from : www.artofcreation.be/.../what-you-should-know-about-database-logging-functional-impact

  • DJF94 Profile Picture
    25 on at

    Make sure there are no alerts on SalesParmTable as well as it has the same impact as having a database log (i.e. insert() method will be executed even if you set true to skip it in the init of the RecordList)!!!

    I did not have any database logging set up but I had an alert setup (done harmlessly from AR/Inquiries/History/Sales orders/) and then every user across ALL the companies in the AX instance suddenly could not post anything on Sales orders!

    Look at the following hotfix from MS as to the code you could add to the SalesParmSubTable.insert() method if you really did want an alert or database logging on SalesParmTable (take note I did not add this code but rather just deleted teh alert):
    https://support.microsoft.com/en-us/help/961909/error-message-when-you-post-a-purchase-order-in-microsoft-dynamics-ax

    Also note the issue exists on the PurchParmTable as far as I can tell (based on the hotfix code MS give for PurchParmSubTable).

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans