Posts

Batch Job Is Not Executing

While working with Dynamics 365 we restore Prod database on UAT to test customization. After database restoration we observe that batch job stuck in waiting. In Prod version of AX we have two AOS servers and we configured it accordingly but on UAT we have only one AOS server so the configuration lost means not Batch Server is assigned to Batch Group. So by just assigning Batch Server to Batch Group our issue is resolved.

Number sequence XXXXXXX has been exceeded.

I have created some custom services to create Purchase Order, Sales Order etc. all the sudden its starting throwing error that Number Sequence exceeded. First i got confused because in Sales Order, Purchase Order number sequence there are still lot of numbers remaining and it can be exceeded. After doing some search it is found that its some other number sequence which limits is exceeded. Here are the step to find the exact Number Sequence which limit is exceeded. 1. Go to AOT -> Data Dictionary -> Tables -> NumberSequenceTable 2. Then find the Recid (5637145251) and get it number sequence code. 3 Then go to Organization administration -> Number Sequence, and then find and adjust the number sequence.

Failed to execute query because no root data source on the form matches the root datasource on the query.

Image
My friend was creating custom lookup and he encounter following error. This error usually occur when the table name differs in SysTableLookup::newParameters() with the table that is used in query.

Dynamics AX 2012 Cache Issue

Some time AX 2012 run into an unexpected issue such as error, client crash, unable to save etc and they are very hard to diagnose the main cause. Some times clearing your App Cache solves the problems. Following are the steps to clear App Cache. Close AX client. Goto C:\users\<your_user>\App Data\Local  App Data folder are hidden by default so you have change the settings of folder view. Delete all the .KTI and .AUC files. Run AX again  and every thing is working fine. I was facing the issue ti frequently so i find a way to minimize time of clearing App Cacghe. Open a blank Notepad file. Type the following lines.             del "%USERPROFILE%\AppData\Local\ax*.kti"             del "%USERPROFILE%\AppData\Local\ax*.auc"        3. Save the file with any name.bat and change the Save as type to "All files (*.*)" ...

Dynamics AX 365 Create Main Account Using X++

DimensionServiceProvider class manages business logic for account. Following is the sample code how to create account using x++. DimensionServiceProvider dimensionServiceProvider; MainAccountContract mainAccountContract; MainAccountCategory mainAccountCategory; DimensionLedgerAccountType dimensionLedgerAccountType; ; ttsbegin; select firstonly mainAccountCategory where mainAccountCategory.AccountCategory == "CASH"; mainAccountContract = new MainAccountContract(); mainAccountContract.parmName("MyDemoAccount"); mainAccountContract.parmMainAccountId("0000001"); mainAccountContract.parmIsBlockedforManualEntry(NoYes::No); mainAccountContract.parmType(str2Enum(dimensionLedgerAccountType, "Balance sheet")); mainAccountContract.parmAccountCategoryRef(mainAccountCategory.AccountCategoryRef); mainAccountContract.parmLedgerChartOfAccounts("MyDemoLedgerChartOfAcco...

Dynamics AX 365/7 : Unable to connect to the remote server at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync

Image
I got following exception when i was using DIXF and other time i was using Task Recorder. After searching on some forum i have found that this exception occurred when Store Emulator is not running. So you have to start it. Perform following step to start Store Emulator. Open Command Prompt as administrator. Now go to "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\". Now enter following command AzureStorageEmulator.exe start. Now you try DIXF or Task Reporter. Issue should be fixed now.

X++ Tip And Tricks : Document Management Directory Does Not Exist

Image
I was working with Document Handling service in Microsoft Dynamics AX 2012. I faced weird error when i try to get attachment file "Document Management Directory Does Not Exists". After some diagnosis i have found that in Document Management Parameters the location to archive file was shared network location and because of AOS service account do not have permission to directory AX is throwing error. To resolve this error open Service.svc and check under which account your AOS service is running and give full permission to user account on shared directory path.