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 :
Finance | Project Operations, Human Resources, ...
Answered

How do I update a private table buffer in an extension class?

(0) ShareShare
ReportReport
Posted on by

I'm working on an extension class for a report DP class and am having trouble updating the table (a regular-type table that uses the CreatedTransactionId field - SalesInvoiceTmp) in my class. I can't directly access the record being updated and inserted by the base class because the table buffer is private. And doing on OnInserting event handler won't work because there I don't have access to table buffers from the class that I need to use to do lookups to do my record updates.

The base class is SalesInvoiceDP and I'm trying to set some custom fields on the SalesInvoiceTmp table, and when setting those fields I need to know what CustInvoiceTrans to use to do lookups to get the values I need to set those custom fields. Any suggestions on how I can do what I need to do, short of asking Microsoft to make changes to the base class? 

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,978 Most Valuable Professional on at

    In my version of application (10.0.14), SalesInvoiceTmp isn't private. It doesn't have any access modified, therefore it's protected and can be accessed from extension classes.

  • Suggested answer
    Community Member Profile Picture
    on at

    You're right - it is protected in my environment. I got an error trying to access this table buffer initially, but I must have misspelled the variable or some other silly mistake. It's working now - thank you!

  • Yuji Imaoka Profile Picture
    on at

    Class extension - Method wrapping and Chain of Command

    docs.microsoft.com/.../method-wrapping-coc

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans