Posts

Showing posts from 2017

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 (*.*)"        4.Now every time you run this batch job your App Data will be cleaned. Make sure to close your AX 2012 client first.

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.

Dynamcis AX Errors : Another instance of CIL generation is already in progress. Please wait for the operation to complete before retrying.

Image
Some times when multiple developers work on same server they encounter this error when they try to run incremental compile, "Another instance of CIL generation is already in progress. Please wait for the operation to complete before retrying.".  This errors occurs when previously compile is not properly or not completed. It can be resolved by executing following queries directly in Sql Server Microsoft Dynamics AX database. select * from SYSLASTVALUE where ELEMENTNAME = 'CIL Generation' This will give you the record for CIL generation , after confirming that record exists delete all the records. delete from SYSLASTVALUE where ELEMENTNAME = 'CIL Generation'

Dynamics AX 365 : The name does not denote a class, a table or an extended data type

Image
I was getting following error during customization of Dynamics AX. After some debugging i found that it is due to model. Error can be resolved by updating model. In this blog i am working with smmActivities but it can applied for any table. Goto your table in AOT you will see model name in square brackets in light color grey. You have to add this model to resolve issue. In my case model name is "Case Management". In toolbar go to Dynamics 365 →Model Management → Update model parameters. Select your model in which you are doing your customization, in my case it is "testModel" and click on next, scroll down and select "Case Management" and select next and then click on finish. Build your solution error should be gone now.

Error while setting server report parameters. Error message: The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)

Image
When ever you receive this error when you try to open any  report "Error while setting report server parameters.Error Message The permissions granted to user are insufficient for performing this operation".   This is the permission issue means user does not have sufficient permission to access report. To give permission to user follow these steps. 1. Hold the shift key and click the mouse right click on the Internet Explorer. then select run as administrator. If you do not get option to run IE as administrator then go to C:\Program Files\Internet Explorer right click on "iexplore.exe" and choose run as administrator. 2.  Go to "localhost\reports" 3. Click The small arrow beside the DynamicsAX Folder them select Security 4. Click "New Role Assignment" 5. Type the domain and user name in textbox and select the Browse option and click on Ok button.    Open Dynamics AX and run report again.