Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
There appears to be a race condition when opening some forms in AX 2012 R2 when the Client performance option of "Form pre-loading enabled" is checked.
The problem seems to most readily manifest on complex forms with lots of controls that are personalized by users. In our case we discovered it with users opening LedgerJournalTransVendInvoice and LedgerJournalTransVendPaym (which incidentally we had not modified from the SYS layer at all). There were other issues with SalesTable as well.
While opening journal lines, we experienced the following error message.
DimensionDynamicAccountController object not initialized. Stack track.. \loadSegments().
This event occurs once for everyone Account number control (including Offset account number) on the form, so it is possible to see anywhere from 2 to 6 errors in the stack trace merely by opening the form.
Debugging with breakpoints shows that the loadSegments() event for each of these controls fires during the Form's init() method, and before the necessary DimensionDynamicAccountController objects have been constructed. Normally the loadSegments() method of the account number controls should not fire until the control is activated for edit. This problem even occurs when opening journal lines for posted journals, where the data source itself is not allowed for edit, and before the user has any ability to focus on a control at all.
This appears to be a race condition, since it can in some cases be highly reproducible and in others can be difficult to reproduce, even while simply opening and closing the journal lines form in quick repetition and doing nothing else. Clearing the AUC and SysLastValue for the user can bring temporary relief.
The problem appears to either require or be highly correlated to user modifications to the form, even as simple as moving a single column within the primary grid.
The problem also appears to depend upon the Form pre-loading enabled option under Client performance options being checked. Note that this option can become checked WITHOUT YOUR CONSENT, and here is how.
After upgrading to AX 2012 R2, the first time you open the SysClientPerf form the following code will run (see below). This code notices that the record is from an older configuration and AUTOMATICALLY sets the IsFormPreloadingEnabled to True as a default value. In our case, we upgraded to R2 in early March and never opened the SysClientPerf form for nearly 6 months, but immediately upon merely opening and closing the form in our production environment began to experience these issues across many users.
Hope this helps someone else.
public void EnsureSingleRecordExists()
select firstonly RecId, CurrentVersion from this;
//Default these two enum values to Yes.
this.FactBoxesEnabled = NoYes::Yes;
this.PreviewPanesEnabled = NoYes::Yes;
this.AutomaticEnhancedPreviewsEnabled = NoYes::Yes;
this.IsFormPreloadingEnabled = NoYes::Yes;
// Make sure the version number is current and perform any necessary
// upgrade steps.
if (this.CurrentVersion != #CurrentVersion)
select forUpdate this where this.RecId == this.RecId;
// Enable form pre-loading by default.
this.IsFormPreloadingEnabled = NoYes::Yes;
this.CurrentVersion = #CurrentVersion;
Thank you for the information. This helped!
Dears kindly ,
do you mean i have to change the value to be no in the table browser of SYSCLIENTPERF ?
How to resolve that issue ?
if i set IsFormPreloadingEnabled option as true getting above error.
if i disable it the error was removed but facing some other performance issues when running reports .
please help me
We've ended up contacting Microsoft as the error occured on multiple forms. MS provided us hotfix 2816385 which solved the error.
Be sure to delete the .auc files when compiling after installing the hotfix as not doing this has caused a table to become a view on our environment.
What is the use of FormPreLoad? is it mandatory to set as YES in AX 2012 r2?
this.IsFormPreloadingEnabled = NoYes::Yes; ?
I'm having the same problem.
After downloading KB 2816385, I found out that there are 17 .msp files in there. (clientoba32/64 , components32/64 , objectserver32/64 , etc.)
Is there any instruction for installing it, or could you please help me to install the hotfix?
Installing any hotfix should be done by running the AXUpdate.EXE file. More information about how to install Dynamics AX 2012 hotfixes can be found in TechNet under the following location: technet.microsoft.com/.../hh335183.aspx