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)

Create extensions from a "Developer Tools Addin" project

(0) ShareShare
ReportReport
Posted on by 152

Hi everybody,

We're trying to create an addin that creates extensions from data entities that are inside of the current project.

I'm using Martin Drab's example from GitHub as base: github.com/.../AddClassMenuAddIn.cs

The CurrentMetaModelService object doesn't have any method for create extensions, only normal objects... I'm trying to do it now with AxDataEntityView.AddExtensionMappings method, but I don't know if this method works for this purpose.

Do you guys know if is it possible or is something that Microsoft haven't done yet?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Joris dG Profile Picture
    17,780 on at

    Extensions are in namespace Microsoft.Dynamics.AX.Metadata.Metamodel.

    Code provided as-is, use at your own risk. But you can do something like:

    IMetadataProvider MetadataProvider = DesignMetaModelService.Instance.CurrentMetadataProvider;

    var tablextension = new AxTableExtension();

    tableExtension.Name = originalTableName + ".MyExt";

    var model = MetadataProvider.TableExtensions.GetModelInfo(otherTableExtensionName); // you need to get model reference from somewhere

    MetadataProvider.TableExtensions.Create(tableExtension, new ModelSaveInfo(model.First()));

  • Luiz Ventura Profile Picture
    152 on at

    It works, thank you Joris.

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 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans