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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX7 Move specific elements from one model to another

(0) ShareShare
ReportReport
Posted on by 160

Hello,

Is there a "magic" way to move elements from a specific model to another?

(As in AX2012 the option move to model)

For exemple:

All my new specific EDT/Table from  MyModel to the ApplicationSuite model?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Tommy Skaue Profile Picture
    Moderator on at
    RE: AX7 Move specific elements from one model to another

    Cut and paste between projects should be sufficient. :D

  • Verified answer
    André Arnaud de Calavon Profile Picture
    299,056 Super User 2025 Season 2 on at
    RE: AX7 Move specific elements from one model to another

    Hi Foxsor,

    The objects are stored per model as xml files in subfolders of c:\Packages. You can simply move objects from one package to another. Note that models do have referenced models. Probably you also need to update the references to some models before you are able to compile the model correctly.

    If you have a model called MyModel there are subdirectories per object type in the next folder: C:\Packages\MyModel\MyModel\

    If you need to move labels, you also need to move additional files from a source subdirectory.

  • Verified answer
    Joris dG Profile Picture
    17,775 on at
    RE: AX7 Move specific elements from one model to another

    It's a tricky question because packages can be in different models. To Andre's point, yes you can move the XML files - but Tommy's suggestion is virtually the same though a bit nicer since you don't have to go digging for the files and folders.

    However, there's some gotchas. If you're over-layering something then moving the file is something you'll want to be careful about for different reasons. Additionally, if you're trying to move to a model that's in a different package, you essentially cannot move the over-layering customization. If they are all new objects, you can move them fine, although keep in mind that moving to a different package may break your compile unless you have references setup in the correct direction.

  • Foxsor Profile Picture
    160 on at
    RE: AX7 Move specific elements from one model to another

    Thanks

  • Suggested answer
    Shahrukh Profile Picture
    501 on at
    RE: AX7 Move specific elements from one model to another

    Just move your desired artifact from back-end, cut the file from "application suite usr model" and paste it to "My Model", Here you GO !! Now when you will open Application explorer, you will see that you artifact has been moved to "My Model".

    In detail:

    Go to below path and cut the artifact you want to move to other model.

    C:\Packages\application suite\application suite usr model\AxTables

    Now go to below path and paste that artifact here.

    C:\Packages\My Model\AxTables

    Open Application Explorer and find the artifact you moved, you will see that it is moved to you desired model.

  • robertk Profile Picture
    360 on at
    RE: AX7 Move specific elements from one model to another

    How does moving the xml files between directories go with source control?

  • Alex Kwitny Profile Picture
    395 on at
    RE: AX7 Move specific elements from one model to another

    @Róbert, I would think you need to move in VSTS otherwise when you get latest, it will just put the files back, which could duplicate them in both models?

  • Zain Bokhari Profile Picture
    3,208 Moderator on at
    RE: AX7 Move specific elements from one model to another

    Hi, Foxsor.

    If your question has been answered please mark the helpful answers as verified and mark this thread resolved. Thanks.

  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at
    RE: AX7 Move specific elements from one model to another

    I'll just chip in with my notes on moving label files:

    • A label file consists of several files.
      Under \AxLabelFile there is an XML file for each language with some metadata about the label files.
      And then again under \LabelResources you'll find the actual label files for each language.
    • In the XML files with the metadata about the labels your need to modify the RelativeUriInModelStore property to reflect the new location.
    • You should move the above files from Visual Studio/VSTS, so you keep version history of earlier changes.
    • If you did an earlier build, you must manually remove the compiled dll's for earlier compiled label files. You'll find these in the Resources folder for the model you moved the files from. There is a dll directly in the folder, and one in the subfolder for each language. If you don't remove the dll's, AX might keep using the old and wrong version.  
  • Alex Kwitny Profile Picture
    395 on at
    RE: AX7 Move specific elements from one model to another

    Here's a Powershell snip you can modify that I used to move in VSTS to retain history.

    $tf = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\tf.exe"
    
    $source = "$/MyProject/Trunk/Main/Metadata/Directory/Directory.MySolution/AxTable/*"
    $target = "$/MyProject/Trunk/Main/Metadata/MySolution/MySolution/AxTable/"
    
    . $tf rename $source $target
    


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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans