Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

Posted on by 705

Hi,

We have recently migrated our 2012 R3 code to AX7 using auto migration. So objects got divided into multiple packages like Application platform, foundation and suite. I am not sure how that division has happened.

But we are facing some issues related to objects which belongs to different packages and package doesn't have reference to the other package.

Like for an example I have a class "LogisticsLocationsDefault" which belongs to "Directory" package trying to use features of "InventLocation" table which belongs to "Application Suite". Now in the class I'm getting error that "InventLoocation object is not recognized as a class, table." This is because "Directory" package doesn't have reference to "Application Suite" and a reference can't be made as well.

What can be a solution to this problem?

If I'll move InventLocation table to "Application Foundation" I'll be able to resolve it, but after moving that object from backend from one package to another how to check-in that object into that package OR is there any other method I should follow to move  the object and check-in?

*This post is locked for comments

  • Verified answer
    Joris dG Profile Picture
    Joris dG 17,775 on at
    RE: After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

    If you're not concerned about source control history, the easiest way to move is create a solution that has a project for the old package/model and one for the new package/model. Add the objects you wish to move to their project, then cut/paste from one project to the other.

    As for extensions, yes you can extend from one package to another.

  • Verified answer
    Nishant2408 Profile Picture
    Nishant2408 705 on at
    RE: After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

    Thanks for the reply ievgen

    1:  How can we move an object from one package to another using VS?

    2:  Can we create extension of an object which belongs to some package into another package?

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

    Hi Nishant Srivastava,

    Migration tool is just a tool and it cant do proper distribution for you it does not know your solution, so you need to do it manually. I'm not sure what do you mean under "backend" but you can move object using VS, if you want to preserve a history you need to use version control system as well.

  • Verified answer
    Nishant2408 Profile Picture
    Nishant2408 705 on at
    RE: After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

    Thanks for your reply Martin!

    I have one more question i.e. from auto migration objects got distributed to different packages. So can I move one object from a package to another from backend OR I shouldn't move?

    I mean as a result of migration, distribution of objects to different package will be proper?

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,030 Most Valuable Professional on at
    RE: After migration from 2012 R3 to AX7 objects used in code showing unavailability errors, because they belongs to a different package

    The Directory package indeed shouldn't have any dependency of Application Suite.

    I assume you have a customization in LogisticsLocationDefault that added this dependency, right? You'll have to redesign your code - if you need to refer to Application Suite, put such code to Application Suite or a package referencing Application Suite.

    Application Suite depends on Directory, not the other way around.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans