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)

How to add method parameters to standard class without customizing (over layering)

(0) ShareShare
ReportReport
Posted on by 5

Hi,

We are trying to add two custom fields to Work Breakdown Structure form (ProjWorkBreakdownStructure), to add those two fields into table we need to call AddTask method of ProjTask Class, here we need to add two new parameters. To add two new parameters we have customized the ProjTask Class (Over layering) is there any way to achieve this without over layering?

*This post is locked for comments

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

    Adding parameters to an existing methods isn't an extension; it would require changes and recompilation of the actual method definition.

    Maybe you can add another method with different parameters, call addTask() from there, find the ProjPlanVersion and update it.

    Obviously addTask() isn't designed for extensibility. If it accepted a contract class instead of a list of parameters, adding additional values would be trivial. Like this:

    void addTask(Contract _c)
    {
        ...
        ProjPlanVersion version = _c.createPlanVersion();
    ... } MyContract extends Contract { ProjPlanVersion createPlanVersion() { ProjPlanVersion version = super(); version.ExtraField = ...; return version; } }

    If you create an extensibility request, consider mentioning this design.

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