July 21, 2012

Form class and tables are used by a specific Dynamics AX form/functional

How to find out which Form class and tables are used by a specific Dynamics AX form/functional 


Hi Friends,


This Technique will help you every where when you need to find the back End of any form report.











This is a basic tip for developers who are starting with Dynamics AX. So, to find the form class and tables that are used by a functional process (like when you are executing and seeing an AX form), what we need to do first is to find out the form class name. To find the AOT form class name, open that form that's used in a process and Right-click on the form (over any record, for example) and select Setup. From there we can see the Form class definition and drill down to see all the tables it is using and so on.



















In red circle you found the table/Class name and its respective field.
For practice just  choose a form and try to find all related tables and used fields.
this will very help full for you to under stand the Form.


- Harry

July 20, 2012

Troubleshooting Error: No License code available for language

Troubleshooting Error: No License code available for language EN-US. Please use a licensed language
Hi there,

 I was setting up an AX Instance from an existing  database backup and I hit this below error.

Error: No License code available for language EN-US. Please use a licensed language

Event Viewer Error: The Microsoft Dynamics AX Application Object Server is running on an operating system that is not supported. The supported operating system is Microsoft Windows Server 2003 with Service Pack 1.


Solution:

The language for the startup user needs to be setup as per the installation

update dbo.USERINFO set LANGUAGE = 'EN-AU', HELPLANGUAGE = 'EN-AU' where ID = 'Admin'

Enjoy...
Harry

July 19, 2012

How to Assig access rights in Axapta between users

 How to Assig access rights in Axapta between users

Assignment of access rights for the users is a very frequent task. This script helps to assign or replicate the access rights between users instantly.


// Script for assigning/swapping access rights between users.
static void assignAccessRights(Args _args)
{
UserGroupList groupList,groupListIns;
str 10 frmUser, toUser;
;

frmUser = 'usr1';
toUser = 'usr2' ;

// To delete the existing permissions of the toUser
delete_from groupList
where groupList.UserId == toUser;


while select groupList
where groupList.userId == frmUser
{
info(strfmt('Group assigned: %1',groupList.groupId));
select forupdate groupListIns
where groupListIns.userID == toUser
&& groupListIns.GroupId == groupList.GroupId;

if(!groupListIns)
{
groupListIns.UserId = toUser;
groupListIns.GroupId = groupList.GroupId;
groupListIns.insert();
}
}
info(strfmt('Permissions changed from: %1 to: %2',frmUser,toUser));
}

-Harry

July 18, 2012

Ax 2009 disk full error Cannot create temporary file: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\appl\standard\tmp\$tmp001303e8.$.


Ax 2009 disk full error

Hi Friends

This problem only seems to occur on 64-bit operating systems and it can be very tricky to pin down the cause....
It occurs on both Terminal servers and Citrix Servers seemingly at random, we've noticed that the most consistent way to reproduce it (for this implementation at least) is by trying to generate a Customer Account Statement, but it can occur also occur when using Select Criteria, trying to generate a report, or when trying to view the permissions tree in a user group

The problem






Cannot create temporary file: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\appl\standard\tmp\$tmp001303e8.$.
The disk may be full.

Which is strange since the disk isn't full on the AOS server or the Citrix/Terminal server
There is a workaround which is to run the Ax client as an Administrator but that can be a major security flaw and isn't a long term solution

The Cause
There's a registry setting which tries to create a temporary sub-directory each time a user connects to a Terminal/Citrix server.
The problem is that when this temporary sub-directory gets created, it doesn't appear that the Ax client has access to it
So while the user may have the correct access to the %temp% directory within their Citrix/Terminal server user profile, they don't have access to the %temp%\1 or %temp%\27 or %temp%\942 sub-directory (the exact number varies and is rarely the same)

The Solution
The solution is to set the registry on the terminal server to not create these sub-directories within the temp folder and just to use the main %temp% directory instead
How do you do that? Well I'm glad you asked, all it takes is a little registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"PerSessionTempDir"=dword:00000000

This change needs to be made in the registry on all the Citrix/Terminal servers that are used to connect to Ax

Here's a handy KB article with a bit more information about these keys

http://support.microsoft.com/kb/243215

Couldn't find this solution posted anywhere else on the internet so it looks like this is a first. Hurrah!


Enjoy Friends...
Harry