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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Adding new parameter to table method using extension

(0) ShareShare
ReportReport
Posted on by

Hello,

As the title say - I'm trying to add new parameter to table insert() method using extension. 

In my extension model I've created a class which extends said table and I've added new method there with exact same signature as in base table, only with new parameter. Then when I try to call insert in extension model class, it doesn't recognise my change. Is it possible to override base methods this way? Is there other solution to this problem?

Regards,

Lukasz Wozniak

*This post is locked for comments

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

    No, changing a method signature in extensions (and having different package seeing two different parameter profile of the same method) isn't possible.

    Nevertheless your attempt is doing something else. You said you'd created another method with the same name and different parameters, which is method overloading - and this concept isn't supported in X++ either.

  • Community Member Profile Picture
    on at

    Thank you for your answer Martin.

  • Manish1607 Profile Picture
    45 on at

    Is there any way to achieve method overloading kind of feature.  I have a base method initQuery(SalesId), which i want to extend using chain of command and want to add extra parameter for JoinType...

    so new method would look like initQuery(SalesId,JoinType).

    Any work around ?

  • Martin Dráb Profile Picture
    239,152 Most Valuable Professional on at

    No, it's not possible by extensions. And if it was possible, all existing code using the method would stop working, because it wouldn't be provided the second parameter value. Therefore all you would achieve the breaking your ERP system. But you can easily create a new method with two parameters and call it from your code.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
GiacomoRovai Profile Picture

GiacomoRovai 4

#3
Douglas Noel Profile Picture

Douglas Noel 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans