D365 FO: GL journal : The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

Jismon Ittiachen 0 Reputation points
2025-12-08T18:53:31.87+00:00

I am getting below error on D365 FO when I create a GL journal in D335 FO VM

The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

the VM doesn't have any customization

Microsoft 365 and Office | Other
0 comments No comments

4 answers

Sort by: Most helpful
  1. KOMI DZIDULA SIABI 0 Reputation points
    2025-12-11T21:23:35.87+00:00

    Was this answer helpful?

    0 comments No comments

  2. Jismon Ittiachen 0 Reputation points
    2025-12-09T17:51:19.7766667+00:00

    Fixed the issue, Below powershell script fix the problem

    $AOSDirectory = 'J:\AOSService\PackagesLocalDirectory'

    $AOSBinDirectory = $AOSDirectory +'\Bin'

    $sharedDLL = 'Microsoft.Dynamics.AX.Xpp.AxShared.dll'

    $subledgerDLL = 'Microsoft.Dynamics.Subledger.Instrumentation.dll'

    $taxDLL = 'Microsoft.Dynamics.Tax.Instrumentation.dll'

    $prodCfgDLL = 'Microsoft.Dynamics.ProductConfiguration.Instrumentation.dll'

    $sourceDocDLL = 'Microsoft.Dynamics.SourceDocumentation.Instrumentation.dll'

    Copy-Item $(Join-Path $AOSDirectory -ChildPath Subledger\bin | Join-Path -ChildPath $subledgerDLL) -Destination $AOSBinDirectory

    Reflection.Assembly::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $subledgerDLL))

    Copy-Item $(Join-Path $AOSDirectory -ChildPath Tax\bin | Join-Path -ChildPath $taxDLL) -Destination $AOSBinDirectory

    Reflection.Assembly::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $taxDLL))

    Copy-Item $(Join-Path $AOSDirectory -ChildPath SourceDocumentation\bin | Join-Path -ChildPath $sourceDocDLL) -Destination $AOSBinDirectory

    Reflection.Assembly::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $sourceDocDLL))

    Copy-Item $(Join-Path $AOSDirectory -ChildPath ApplicationSuite\bin | Join-Path -ChildPath $prodCfgDLL) -Destination $AOSBinDirectory

    Reflection.Assembly::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $prodCfgDLL))

    Reflection.Assembly::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $sharedDLL))

    Was this answer helpful?

    0 comments No comments

  3. Anonymous
    2025-12-08T21:51:41.9833333+00:00

    Hi Jismon Ittiachen, I know this has been exhausting when a simple GL journal throws a cryptic performance‑counter error on a clean FO VM it feels unfair especially when you’ve got real work waiting and the usual check config advice doesn’t help.

    Run the admin PowerShell script on your AOS VM to copy and load the Dynamics instrumentation DLLs call each PerformanceCounterCatalog.Setup and AxPerformanceCounters.InitializePerformanceCounterCategories to create the missing counter categories then restart AOS/IIS verify in perfmon that Microsoft.Dynamics.Subledger. Microsoft.Dynamics.Tax and Microsoft.Dynamics. counters exist and rebuild Windows counters with lodctr /R first if they’re corrupted and if you’re on 10.0.45 apply the latest Quality/Platform Update via LCS.

    On that VM, did you run the PowerShell initialization as an Administrator on the exact AOS path example K:\AOSService\PackagesLocalDirectory) and after the restart does perfmon show the Dynamics categories under the same Windows account the AOS service runs no permission mismatch between your admin user and the AOSService identity?

    Best regards

    Lucky Charm

    Was this answer helpful?

    0 comments No comments

  4. AI answer

    2025-12-08T18:53:46.89+00:00

    The error message you are encountering in D365 FO regarding the Performance Counter indicates that the system is expecting a ReadOnly initialization for the counter in question. Since you mentioned that the VM does not have any customization, it is likely that the issue could stem from the default settings or configurations of the Performance Counters within the environment.

    Here are a few steps you can consider to troubleshoot this issue:

    1. Check Performance Counter Configuration: Ensure that the Performance Counters are correctly configured and initialized as ReadOnly. This may involve checking the settings in the Performance Monitor or related configuration files.
    2. Rebuild Performance Counter Library: If the Performance Counter library is corrupted or not properly registered, you may need to rebuild it. This can often resolve issues related to performance counters not being recognized correctly.
    3. Consult Documentation: Refer to the official Microsoft documentation for D365 FO regarding Performance Counters to ensure that all necessary steps have been followed for proper initialization.

    If the problem persists, you may need to reach out to Microsoft support for further assistance, especially if this is a production environment.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.