Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Why the original class ignored and only call extension class instead ?

(1) ShareShare
ReportReport
Posted on by 312
Hello everyone,
 
I'm creating an extension class for table SubBillDeferralTransactionLineDeferral, and inside we create method for initFromSalesLine(SalesLine _salesLine, boolean _defaulting, boolean _maintainPostingAccount)
 
In the middle of that method, we put / next initFromSalesLine (_salesLine,  _defaulting);/ right after several more codes.
 
Later in other class, I want to insert some data into this table, by having this kind of statement:
 
         SubBillDeferralTransactionLineDeferral        deferralTableInsert;
         ttsbegin;
                    deferralTableInsert.clear();
                    deferralTableInsert.initFromSalesLine(MycustInvoiceTrans.salesLine(),true);
                    deferralTableInsert.insert();
          ttscommit;
 
 
To my surprise, when I debug the line /deferralTableInsert.initFromSalesLine(MycustInvoiceTrans.salesLine(),true);/ , while I understand it can to that earlier extension class, I'm wondering why it does not hit the original method from that table as well ?
Because I put breakpoint on the table's method, however it is not stop there, also I found there is no data updated while it should have if the original method being called.
 
 May I have some clue what could possibly wrong ?
Thanks
 
 
  • Layan Jwei Profile Picture
    7,725 Super User 2025 Season 1 on at
    Why the original class ignored and only call extension class instead ?
    Hi Teevo,
     
    Yes it seems you didn't enable debugging for other modules. Because if you did extensions where the next is called then definitely the original method should be called
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    293,245 Super User 2025 Season 1 on at
    Why the original class ignored and only call extension class instead ?
    Hi Teevo,
     
    You can select which models will be used for debugging. By default, it will only debug your custom model. Go to Extensions > Dynamics 365 > Options... Then select the debugging tab where you can enable debugging other (related) models.


  • Martin Dráb Profile Picture
    231,927 Most Valuable Professional on at
    Why the original class ignored and only call extension class instead ?
    The method is called; you have a problem with debugging. First of all, verify that you've enabled Subscription Billing package at Dynamics 365 > Options > Debugging.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans