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 :
Microsoft Dynamics AX (Archived)

What exactly are extensions?

(0) ShareShare
ReportReport
Posted on by 1,055

Hi,

What exactly are extensions? I see that when I extend an object lets say : SalesTable.

A new object gets created in my current model called SalesTable.Extension.

Now- how is an extension different from a duplicate object? Let's say on SalesTable, I do right click and duplicate and rename that object. Is the extension still connected to the original object?

Using SalesTable.Extension

How do I add the extended version in my form datasource? The table SalesTable.Extension does not show up in the list of tables when I add datasource.

Also, if I have multiple extensions of SalesTable, how do I ensure which version is being used?

Thanks in advance,

Khan

*This post is locked for comments

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

    If you copy an object, you get - well - a copy. In case of SalesTable table, you get a new table with all fields, methods etc. identical to what's on SalesTable. But it's a new table and no changes you do there have any impact on SalesTable table.

    An extension is something completely different. You use it when you want to modify the existing table, such as to add some fields there. Modifying a copy wouldn't be useful; you want to change the table used for sales orders.

    Therefore you'll create an extension and add some fields there. What's stored in the extension are just your changes, not the whole SalesTable table. Your changes will then apply to the standard form, e.g. you'll see your extra fields. Obviously you still refer to the table you extended (SalesTable). The extension isn't a table and can't be used separately from the object it extends.

    You could also modify the table by creating a so-called customization, which is more powerful, but you could get into troubles when Microsoft makes some changes to the table - you would have to perform code upgrade then.

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    If you have multiple extensions, all of them will be used. That allows several companies to extend the same object without getting any code conflicts.

  • Khan Profile Picture
    1,055 on at

    Thank you so much for the explanation. It helped me a lot.

    So, if I extend the SalesTable and add a new field in the extension- that field would be available everywhere where the Standard SalesTable has been used like the SalesTable form?

    Also, if I create two extensions of SalesTable : SalesTable.ExtensionA , SalesTable.ExtensionB

    I add the following fields:

    SalesTable.ExtensionA  ------ I add a field called 'AName'

    SalesTable.ExtensionB  ------ I add a field called 'BName'

    Now, in standard SalesTable which fields would be available? Both of them?

  • Mea_ Profile Picture
    60,284 on at

    Hi Khan,

    You can do ExtensionA  in model "A" and ExtensionB  in model "B". In this case you will be able to use "AName" only from code that belongs to Model "A" or has a reference to model "A" and use "BName" only from code that belongs to model "B" or has a reference to model "B".

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans