Showing posts with label Dynamics AX. Show all posts
Showing posts with label Dynamics AX. Show all posts

Friday, January 19, 2018

SSRS: Error: The user or group name ‘Domain\SomeUser’ is not recognized

Description: When you install SSRS after restore backup it shows error like as follow:

An error occurred while adding users 'Domain\SomeUser','Domain\SomeUser2' to the SQL Server Reporting Services DynamicsAXBrowser role in the folder DynamicsAX. The error is: The user or group name 'Domain\SomeUser' is not recognized.


Solution: Remove entry of previous SSRS server from SysServerSessions table and then restart AOS service.

Monday, October 9, 2017

Microsoft Dynamics AX 2012 Data Import/Export Framework standalone version for AX 2012 R2 without installing full CU7

Before you begin: 

  • Download the CU7 hotfix package [KB2885603] and extract it to a local folder
  • Download the hotfix package for KB 3018235, and extract it to a local folder.

Install the AX 2012 R2 CU7 Data import/export framework for use with SQL Server 2014 Integration Services:

  • Copy MSI files of DIXF_Service_x64 and DIXF_Service_x86 CU7 hotfix extracted folder to Import export hotfix MSI folder.
  • Open PowerShell Run as administrator and Navigate to the Support folder of the hotfix package run following script
Install-DIXFService.ps1.
  • You will be ask to locate the Data Import/Export Framework service MSI from Microsoft Dynamics AX 2012 R2 CU7. This file can found in the MSI\DIXF_Service_x64 or MSI\DIXF_Service_x86 folder. If the script is unable to locate the corresponding MSP, you will be asked to locate it. The MSP can found in the MSI\DIXF_Service_x64 or MSI\DIXF_Service_x86 folder in the hotfix package folder (KB 3018235). You will ask if you want the Data Import/Export Framework Service to install under the Network Service account. If you answer No, you will asked to enter the username (DOMAIN\username format) and password to run the service. Installation should start.
  • Once Service installation done start KB 3018235 to install and apply DIXF update to all Dynamics AX components.
  • After update installation completed. Run Cumulative Update 7 [CU7] setup and update Data import Export AOS and Client Components.
  • After installation add system service account to Microsoft Dynamics AX Data Import Export Framework Service Users group and restart AOS and data import export services.

Tuesday, July 11, 2017

Failed to create session during database synchronization

Error : Failed to create session during database synchronization

Solution : 
Check System Service Account user have db_datareader, db_datawriter, db_ddladmin and db_owner permission on database

If you Import contoso database using Data Transfer Tool and upgrade it to CU12:


  • I believe the reason for recreating partitions is because when you import the Demo Data using Data Transfer Tool some system tables are left untouched, including UserInfo table, and the cockpit needs an Admin account for each partition to use on “RunAs”.
  • The Demo Data consists of three partitions, Initial (default), Public Sector and Extended, for some reason when I deleted the partitions and created again, it didn’t create an Admin account for every new partition.


  • My solution was to create an Admin account for each partition through job in Dynamics AX.

static void CreateUserAdmin(Args _args)
{
       UserInfo userInfo;
       select userInfo where userInfo.id == 'Admin';
       userInfo.(fieldNum(UserInfo, Partition)) = 5637144578;
       userInfo.insert();
}


  • This job selects a record from UserInfo with ID equals to Admin and then it modifies the field partition to a manual value, that’s why I had to use “(fieldNum(UserInfo, Partition))”, otherwise AX won’t let me assign a value manually.
  • Checking records through SQL Management Studio again using below query 

SELECT ID, PARTITION, PARTITIONS.NAME
FROM USERINFO
INNER JOIN PARTITIONS ON USERINFO.PARTITION = PARTITIONS.RECID
WHERE USERINFO.ID = 'Admin'


  • After completed above procedure restart  AOS service and check Upgrade Cockpit.

Wednesday, June 28, 2017

AX 2009 client raise error: "An invalid directory structure for Microsoft Dynamics AX was detected"

Error: AX 2009 client raise error: "An invalid directory structure for Microsoft Dynamics AX was detected"





Solution: There are 2 solutions either change in registry in all user or perform silent installation of dynamics ax 2009 client with predefined path.

Problem occur due to below registry entry:
[HKEY_CURRENT_USER\Software\Microsoft\Dynamics\5.0\Configuration\Original (installed configuration)]
“bindir”=”\Client\Bin”
“datadir”=”Client\Data”
“directory”=”\Client”

Make changes as follow: 

[HKEY_CURRENT_USER\Software\Microsoft\Dynamics\5.0\Configuration\Original (installed configuration)] [For x64 based system]
“bindir”=”C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin”
“datadir”=”C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Data”
“directory”=”C:\Program Files (x86)\Microsoft Dynamics AX\50\Client”

[HKEY_CURRENT_USER\Software\Microsoft\Dynamics\5.0\Configuration\Original (installed configuration)] [For x86 based system]
“bindir”=”C:\Program Files\Microsoft Dynamics AX\50\Client\Bin”
“datadir”=”C:\Program Files\Microsoft Dynamics AX\50\Client\Data”
“directory”=”C:\Program Files\Microsoft Dynamics AX\50\Client”

This is manual configuration in all client machine. To install ax client silent way copy AX 2009 source in on folder and run below command prompt [cmd.exe]

D:\setup SETUPLANGUAGE=EN ConfigurePrerequisites=1 HideUI=1 AcceptLicenseTerms=1 InstallPath=”C:\Program Files\Microsoft Dynamics AX\50″ InstallPath32Bit=”C:\Program Files (x86)\Microsoft Dynamics AX\50″ InstallClientUI=1 ClientConfig=1 ClientAosServer=AOS-Server ClientLanguage=en-US ClientHelpLanguages=en-US;en-US
  

Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error

Error: Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression)

Solution:
The error seems to occur mostly with Reporting Services that have been configured to use a Microsoft Dynamics AX configuration file, Microsoft.Dynamics.AX.ReportConfiguration.axc.
The solution to this problem is to change the permission set name on the Report_Expressions_Default_Permissions in the rssrvpolicy.config file within the SSRS reportserver directory.

=====================================================================================
Standard configuration:
=====================================================================================
<CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”Execution” Name=”Report_Expressions_Default_Permissions” Description=”This code group grants default permissions for code in report expressions and Code element. “>
[…]
</CodeGroup>
=====================================================================================
New configuration:
=====================================================================================
<CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust
Name=”Report_Expressions_Default_Permissions” Description=”This code group grants default permissions for code in report expressions and Code element. “>
[..]
</CodeGroup>
=====================================================================================

Error: Duplicate type with name ‘Dynamics.Ax.application.*’ in assembly when generate Full CIL

Duplicate type with name 'Dynamics.Ax.application.*' in assembly when generate full CIL.  As a result of this issue is many things within AX may stop working and if you go into
<Company>/System administration/Setup/Services and Application Integration Framework/Inbound Ports you will see many of the services have stopped and can not be restarted this causing issues within the AX instance.

Solution : Perform below steps to resolve this issue:

  • Stop all AOS instances
  • Delete all files on the AOS server under C:\Program Files\Microsoft Dynamics AX\60\Server\<aos instance name>\bin\XppIL
  • Connect to the model database via SQL Management studio
  • Truncate the table SYSXPPASSEMBLY which lists all of the fies found in XppIL
  • You can do this via the command: TRUNCATE TABLE SYSXPPASSEMBLY
  • Start AOS service
  • Run Full CIL

Exception has been Thrown by the target of an invocation Dynamics Ax

Description: Exception has been Thrown by the target of an invocation Dynamics Ax error occurred.



Procedure:  This error occur due to failed name resolution. So to resolve issue change Database server configuration in dynamics ax server configuration add IP address of SQL server instead of name of server. This issue generally due to name not resolved or if you do not want to change ip address instead of name then you need to restart DNS client Service in AOS server.

Label ID Display Instead Of Label Text

Description: In Dynamics AX label ID display instead of Label Text

Procedure: There are 2 solutions for remove label ID  are as follow:
Solution 1:

  • Stop AOS service 
  • Remove all .auc files from all user profile [C:\Users\username\AppData\Local] path
  • Start AOS service and check
Solution 2:
  • Get all users out of the system and Stop all AOS servers
  • On each AOS, Go to the App location C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\Application\App\Standard
  • Remove all files in the standard folder, but leave the subfolders, such as Tmp and DB.
  • Start each AOS which will create the necessary labels and files in this folder.
  • Check the labels are update correctly or not.