error : “Target principal name is incorrect” when running SSRS AX 2012 R3

Example of the error :

In my case , the issue occurred because outdated *.AXC files (ax configuration files) in report server folder.  error cause is still unknown, my client not provided details on what changes they did in the ax server.

How to solve this issue :

  1. Create New AX Configuration Files, refresh WCF (using Refresh Configuration).


  1. Export it to a file and rename it to Microsoft.Dynamics.AX.ReportConfiguration


  1. then replace the file with new one in folder path C:\Program Files\Microsoft SQL Server\MSRS11.\Reporting Services\ReportServer\binCAPTURE1

Only foreign key constraints are allowed on this table.

Best Practice Error

Only foreign key constraints are allowed on this table


How to rectify this best practice error.

For Custom Table

  1. Export table to XPO
  2. Edit it with text editor, and change
    • from: EnforceFKRelation 1
    • to: EnforceFKRelation 0
  3. delete table in AX, synchronize
  4. import  xpo file


For Standard  Table

Some custom relation table may have some error on standard table, we can fix this  best practice error using same trick as above, but for this one lets check on XPO file and change REFERENCETYPE value.

  1. Export table to XPO
  2. Edit it with text editor, and change
  3. delete table in AX, synchronize
  4. import  xpo file


error : DNS Lookup Failed when open EP pages from another computer

Problem :


I tried to ping with Sharepoint Server IP and got response, but i cant ping with computer name. The EP itself is working fine if i open it on another computer that already joined domain.

temporary solution :
just go to drive “C:\Windows\System32\drivers\etc”
on file “Hosts” , add

or you can set use IP on sharepoint at alternate access mapping menu :

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 :

how to add custom DLL reference to resolve error “missing an assembly reference” on enterprise portal AX 2012

if you add custom DLL to your VS project. When you open up web page you will receive error “are you missing an assembly reference?”.

to resolve this issue.. just copy paste the custom dll to folder (Sharepoint Server) C:\inetpub\wwwroot\wss\VirtualDirectories\PORT_NUMBER\_app_bin .

do incremental CIL and reset IIS

Reset the IIS :


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

refresh DB Sync error log

i found error log that make no sense after DB sync on AX 2012 R2 CU7. the table that the error pointed to already deleted, but the error still occurred.

here is the solution :
“If you are getting synchronization errors that do no make sense or that you think you should have already resolved there may be old records left in the SQLsyncinfo table or have old or incorrect object ID references. If you suspect this make a database backup, shutdown the AOS, in SQL run truncate table SQLSYNCINFO, start the AOS and run a new Synchronize from the AOT.”

source :

Kernel version and application version number are different on AX 2012 R3 CU8

i installed AX 2012 R3, then i installed R3 CU8 update with offline package.
the problem is after installed, the version number is different.

although it was running well on the first heavy test, i’m afraid the R2 crash issue because different build number will raise again at R3.
to make it same , install AX R3 with slipstream CU8 package update, here is the full guide from MSDN blog :

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.