I'm involved in a migration from Ax2012 R3 CU10 to Dynamics 365 for Finances and Operations Enterprise (formerly Dynamics 365 for Operations, D3FO for now).
I cannot add AOT objects (specifically, class CustomerInvoiceSubledgerJournalTransferCommandExtension) to none of the models (option "Add to project" appears greyed). So I suppose I must manage something with models. Well, when I click Dynamics 365 - Model Management - Create model / Update model parameters, this message appears:
Module "ApplicationSuite" has invalid reference to module "Expense" that can cause circular dependencies. This is an indication thath model store is in a broken state.
Any ideas or advices to solve this?
*This post is locked for comments
I finally managed to figure how to add this class to the customization project.
Go to K:\AosService\PackagesLocalDirectory\ApplicationSuite\ApplicationSuite.[ModelInAx2012]\AxClass\Delta
Create file CustomerInvoiceSubledgerJournalTransferCommandExtension.xml with this content:
<?xml version="1.0" encoding="utf-8"?>
<AxClassDelta xmlns:i="www.w3.org/.../XMLSchema-instance">
<Conflicts />
<DeltaName>SubledgerJournalTransferCommand</DeltaName>
</AxClassDelta>
Go to your project folder with model, in my case C:\Users\eqmdeveloper1\Documents\Visual Studio 2015\Projects\UpgradedSolution\ApplicationSuite.[ModelInAx2012], and modify ApplicationSuite.EXC_ECUADOR_LOC_VAR.rnrproj
Add node where appropiate (look for some examples in same file):
<Content Include="AxClass\CustomerInvoiceSubledgerJournalTransferCommandExtension">
<SubType>Content</SubType>
<Name>CustomerInvoiceSubledgerJournalTransferCommandExtension</Name>
<Link>Classes\CustomerInvoiceSubledgerJournalTransferCommandExtension</Link>
</Content>
Save all and reopen project in VS. Voilá!!
I solved the model reference issue thanks to this link:
community.dynamics.com/.../232128
I found that 2 of the models created by the LCS migration tools referenced a non-existing module called "Expense". So I deleted its references, reopened VS and voilá.
About the CustomerInvoiceSubledgerJournalTransferCommandExtension object, what I really want is to add it to one of the projects so I can customize it.
I have 3 solutions, with different models created by LCS Migration Tool. As example, I have the "UpgradesSolution" with 6 folders. One of them is ApplicationSuite, where is the ApplicationSuite.[NameOfTheModelInAx2012] project, belonging to "Application Suite [NameOfTheModelInAx2012]" model. Inside, among others, is the folder "Classes" where I see, per example, the class "BankVoucher [c]". Note that the original class belongs to the same Application Suite model, as CustomerInvoiceSubledgerJournalTransferCommandExtension does. And I can customize BankVoucher freely, but I can do nothing with CustomerInvoiceSubledgerJournalTransferCommandExtension...
PS: thanks for your quick answer, I appreciate that!!
If you are trying to extend an element, look on the element that you are trying to extend, take note of what is the package that the element belongs and update your package to have the referenced package linked to that one. To create extension to your new package, the package of the element that you are trying to extend has to be “referenced” on your package.
If you are trying to customize an object, make a note that you cannot customize an object, outside a package. If, you want to customize an object of “PackageA”, make sure, your current project belong to a model, which has access to “PackageA”
Regarding circular reference, please note that if a model refers to another model then the other cannot refer to first one. As you are getting error for circular reference, that means your model 'Expense' already refers to application suite. You can omit this issue of circular reference by introducing a third package, where you can refer both packages and can use code of both in a third package/model. But this is not a must to use third package. It all depends upon what you are trying to do.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156