Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

LCS deploy new package update to TEST environment

(0) ShareShare
ReportReport
Posted on by 4,125

Hi,

I used LCS to deploy a new deployable package from Dev to TEST. However it showed failed at step 10 - "GlobalUpdate script for service model: AOSService on machine: demo-0". What would be the trouble shooting procedure to find out the cause of it?

Thanks,

*This post is locked for comments

  • Suggested answer
    Juan Antonio Tomas Profile Picture
    Juan Antonio Tomas 236 User Group Leader on at
    RE: LCS deploy new package update to TEST environment

    Hi,

    We have had this problem in TEST and PROD environments, and the error comes because Microsoft has code checks that looks for any set with just main account in it, and if it doesn't find one, it tries to create one but only attempts to name it "Main account set"

    If you have the "Main account set" created, it fails with a duplicate.

    You have to drop the extra dimensions from Main Account Set and optionally create another set with the dimensions you want

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: LCS deploy new package update to TEST environment

    One more thing to consider: if you really have this kind of account structure in use, your production deployment will fail as well. When deploying to production, you can't even access the database, so you have to find another solution.

    The easiest solution is not using such dimension hierarchies. But you could also check if this bug in the deployment scripts has already been fixed by Microsoft. And if it's not fixed, you could raise a support request to MS.

  • Yuji Profile Picture
    Yuji 4,125 on at
    RE: LCS deploy new package update to TEST environment

    Thanks Nikolaos for your help!

    I end up with export these records to another database, delete all of them. After the deployment, I copy them back to Dimension Hierarchy table.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: LCS deploy new package update to TEST environment

    We actually faced this same problem a couple of months ago. Deep down this is a bug in Microsoft's deployment scripts.

    If I remember correctly, this error occurs if you have an account structure, where MainAccount is not the first element in the structure. Could you verify if this is the case for you? If it is, you could try modifying or deleting that account structure.

    In our case we just copied database from another environment, where such setup had not been made, and the problem was gone.

  • Yuji Profile Picture
    Yuji 4,125 on at
    RE: LCS deploy new package update to TEST environment

    Thanks Nikolaos,

    Check the log:

    >>>>>>>>>>>>

    Infolog diagnostic message: 'Cannot create a record in Dimension set (DimensionHierarchy). Dimension tree name: Main account set, Main account set.

    The record already exists.' on category 'Error'.

    03/28/2017 09:19:31: Application configuration sync failed. Custom action sync failed with error: 'DuplicateKeyNotRecoveredException:

      at Dynamics.AX.Application.DimensionHierarchy.getMainAccountFocus(Boolean _forUpdate, Boolean @_forUpdate_IsDefaultSet) in xppSource://Source/Dimensions\AxTable_DimensionHierarchy.xpp:line 966

      at Dynamics.AX.Application.DimensionHierarchy.getMainAccountFocus()

      at Dynamics.AX.Application.DimensionMetadataSetup.loadData() in xppSource://Source/Foundation\AxClass_DimensionMetadataSetup.xpp:line 38

      at Dynamics.AX.Application.SysSetupInstaller.writeAllData() in xppSource://Source/ApplicationPlatform\AxClass_SysSetupInstaller.xpp:line 278

      at Dynamics.AX.Application.SysSetupInstaller.run() in xppSource://Source/ApplicationPlatform\AxClass_SysSetupInstaller.xpp:line 257

      at Dynamics.AX.Application.SysSetupInstaller.loadPartitionData(Object[] _c) in xppSource://Source/ApplicationPlatform\AxClass_SysSetupInstaller.xpp:line 378

      at Dynamics.AX.Application.SysSetupInstaller.loadAllData(Boolean _allPartitions, Boolean @_allPartitions_IsDefaultSet) in xppSource://Source/ApplicationPlatform\AxClass_SysSetupInstaller.xpp:line 372

      at Dynamics.AX.Application.SysSetupInstaller.loadAllData(Boolean _allPartitions)

      at Dynamics.AX.Application.Application.RaiseOnDbSynchronize(Int32 tableId, Boolean syncAsNeeded, Boolean continueOnError, Boolean showProgress, Object[] checkSyncTables, Boolean createAllIndexes, Boolean useLockForSingleTable, Boolean @tableId_IsDefaultSet, Boolean @syncAsNeeded_IsDefaultSet, Boolean @continueOnError_IsDefaultSet, Boolean @showProgress_IsDefaultSet, Boolean @checkSyncTables_IsDefaultSet, Boolean @createAllIndexes_IsDefaultSet, Boolean @useLockForSingleTable_IsDefaultSet) in xppSource://Source/ApplicationPlatform\AxClass_Application.xpp:line 387

      at Dynamics.AX.Application.Application.RaiseOnDbSynchronize(Int32 tableId, Boolean syncAsNeeded)

      at Microsoft.Dynamics.AX.Deployment.Setup.AppOperations.RaiseOnDbsyncSyncApplEvent()

      at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass28_0.<RunCustomAction>b__0()

      at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)'

    03/28/2017 09:19:31: The operation failed.

    >>>>>>>>>>>>>>>

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: LCS deploy new package update to TEST environment

    First step would be to download and review the logs of the deployment process, to get more precise information about what went wrong.

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans