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)

LCS deploy new package update to TEST environment

(0) ShareShare
ReportReport
Posted on by 4,131

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

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

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

  • Yuji Profile Picture
    4,131 on at

    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.

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

  • Verified answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    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
    4,131 on at

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    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.

  • Suggested answer
    Juan Antonio Tomas Profile Picture
    236 User Group Leader on at

    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

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#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