Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

insert_recordset with table extension

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm beginning my journey into AX7 and recently encountered a problem that I cannot solve. I've extended a temporary (TempDB) table and added a new field. I then have a customization to a class where I am trying to add the new field to a field list of an insert_recordset statement. However the new field doesn't show up in intelli-sense and if I try to force it in, I get a compiler error. I've tried restarting IIS, refreshing AOT, restarting the azure box, synchronizing tables, etc. but nothing works. Finally when in debug mode, I can see the new field in the buffer so it seems that it was added correctly. Any help would be appreciated.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: insert_recordset with table extension

    Thank you Mohammad, this may indeed work in my case. I'll update as soon as I confirm.

  • Verified answer
    Basheer17 Profile Picture
    Basheer17 2,720 on at
    RE: insert_recordset with table extension

    CustVendAgingCalculation has been initialized using static construct method. You can create a derived class, override the desired method. Write a post eventhandler for CustVendAgingCalculation's construct method change the return value to derived class object. This way your overridden code will be called instead of base code. Refer ievgensaxblog.wordpress.com/.../ax-7-trick-to-override-method-in-derived-class-without-overlaying for more info.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: insert_recordset with table extension

    ** Update **: The customization of the 'selectClosedTransactions()' method is in the ApplicationSuite model and is unable to 'see' the new field in CustVendAgingProcessingTmp table which is in the ApplicationSuiteExtension model because the extension model is above the ApplicationSuite model. If I add the new field by customization, all changes are in ApplicationSuite and everything works like it should. Is there a way to accomplish this using extensions?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: insert_recordset with table extension

    I am modifying the 'selectClosedTransations()' method of the CustVendAgingCalculation class. I've added a new field 'ReportingCurrencyAmount' to the CustVendAgingProcessingTmp table and need to include this field in the insert_recordset statement of this method.

    protected void selectClosedTransactions(CustVendAgingProcessingTmp _agingProcessingTmp)

    {

    var custVendTrans = this.setCustVendTransBuffer();

    var custVendSettlement = this.setCustVendSettlementBuffer();

    insert_recordset _agingProcessingTmp

           (AccountNum, TransRecId, CurrencyCode, SettlmentRecId, ExchAdjustment, AmountCur)

     select AccountNum from customersVendors  ...

  • Basheer17 Profile Picture
    Basheer17 2,720 on at
    RE: insert_recordset with table extension

    If you are customizing a standard class, you can implement a delegate and write the eventhandler in your extension model there you'll get the intellisense for the newly added fields. Implementing a delegate would still be overlayering. If you can tell us where exactly you are trying to make the changes probably we could suggest a solution without overlayering.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: insert_recordset with table extension

    The table extension belongs to AppSuite extension, the customization is in AppSuite

  • Basheer17 Profile Picture
    Basheer17 2,720 on at
    RE: insert_recordset with table extension

    Does your table extension and class belong to the same model.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans