error: Cannot create record. The Record already exists.

Problem :
Our client recently facing this error during creating any journal lines (LedgerJournalTrans) .

we did restart aos, full CIL, and any standard technical troubleshoot hoping it was a cache error or something like that. And we tried drop the table and inject it with the copied data. After doing some checking on table SystemSequences with table id 212 (ledgerJournalTrans), its nextVal RecId value record is already exist on that table.

reference for RecId on AX :

solution :
1. Stop the AOS
2. get the max recid from the table on SQL with:

select max(recId) from ledgerjournaltrans;

3. update the systemSequences table on SQL with:

update SYSTEMSEQUENCES set NEXTVAL = 'MAXRECID from table' where tabid= 'tableID'

4. restart AOS and run AX

Conclusion :
they did not doing some sort of AX Version upgrade that will impact whole data
and the main problem why the AX stored procedure on SQL returning next RecId value for the next record that already exist on the table remains a mystery.

Reference :

error : Paging is not supported for queries that do not have an ordering property.

example error :

if you are using list page for EP,
at your list page interaction class on AX.

do override method initializeQuery and add sortbyfield like example below

public void initializeQuery(Query _query)



do Incremental CIL after you modify the code.

error : The type or namespace name ‘Portal’ does not exist in the namespace ‘Microsoft.Dynamics’ (are you missing an assembly reference?)

i found this error when tried to edit and build solution for standard web control on visual studio.


how to resolve :
Right Click on your project and select add EP Proxy Project.

source :

error : Errors in the high-level relational engine. A connection could not be made to the data source with the of ”,

i found this error when i tried deploying cube via ax wizard.

how to fixed error :
1. Just run the analysis service as admin domain or user domain that have the right priveleges. Set it up on SQL Server Management Configuration.

2. Then redeploy the cube :

related source :

error : Data or calculated fields with type ‘Record’ are not supported. EP AX 2012

found error : Data or calculated fields with type ‘Record’ are not supported when open custom page on Enterprise Portal.

the reason behind is because the DISPLAY method on table datasource or related table on AX is returning record.

example the error cause :

error : The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type System.Security.Permissions.EnvironmentPermission

this error occur when I run the SSRS report. Here are to solution :

1. on your windows server that contains SQL Server, go to C:\Program Files\Microsoft SQL Server, then do find the MRS for your environment.
2. find rssrvpolicy.config
3. replace PermissionSetName=”Execution” on class=”UnionCodeGroup” with PermissionSetName=”FullTrust”

source :

error : For views relation fields in query can not come from base or derived tables.

This error occurs at on standar AX View because i add new relation on Derived table.


example base table :

how to fix it :
1. At the example views QUERY HcmBenPolWkrPosDtlInfo, find OMOperatingUnit datasource, and find the relation on the table.

2. Set the RELATIONS properties to NO on query datasource table , then right click on the relations, add new relations and manually configure the tables relations, do this for the all base table in datasource too

3. Then restore the query views, do restore to on the views, then re-compile the view

error : Failed to create a session, confirm that the user has the proper privileges to log on to Microsoft Dynamics

I just recently installed new fresh AX 2012 R3 and importing data using Test Data Tools : .

but somehow when i start sync db after full compilation and full CIL, i got following error :
“Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics”.

i logged in using domain administrator.

here is the solution :
on the user mapping at SQL Server , make sure the db owner for administrator is checked. if you are using another user, just make sure db.datareader and db.datawriter is checked.

voila !! , the ax db sync successfully

more info :

error: The data source is not embedded within a (parent) data source.

This error will occur when you add new dataSource with function “addDataSource(tableNum(MyTable))” but not specify which it’s parent datasource

so example code before :

qbsInventDim = _query.addDataSource(tableNum(WMSLocation));

code after :

qbsInventDim = _query.dataSourceTable(tableNum(InventDim)).addDataSource(tableNum(WMSLocation))

Upgrade SSRS from AX 2012R2 to AX2012R3 error

when deploying SSRS report from ax 2012 R2 to R3 i got following error :


and i did some search for this error , here is the solution :



so i did export all the R2 reports in one project, replace all the version from to with notepad++, and reimport again, and done :d

error : “”Object reference not set to an instance of an object” when open SSRS Report

try one or all of this solutions below :
1. Generate Incremental CIL
2. Compile on the customized report including report class (Contract, controller, DP). If you have modified TMP table , please do synchronize on that table.
3. Clean User Usage data on Tools-> Option -> Usages Data.
4. Restarting reporting services.
5. Refresh all cache on AOT, on AOT-> Tools -> Caches
5. Re-Deploy the SSRS report.
6. Restarting AOS. << sometimes it works like magic -_-“

Found a BudgetPlanningProcessTmp record instead of an expected BudgetPlanningProcess record.

Version : AX 2012 R2 CU7
Found this error this morning when select a record in budgetplanning lookup.
Error detail :
“Found a BudgetPlanningProcessTmp record instead of an expected BudgetPlanningProcess record. Check to see if an override of the resolveReference method is returning a record from the correct table.”
Solution :
Revert static method BudgetPlanGenerateBudgetTrnsForm::lookupBudgetPlanningProcess back to SYS layer using compare.