December 23, 2014

How to Attachments button on a new form DAX 2012 R3

Hi Friends,

Here is another post to share with you all.
In this post will will demonstrate how to add a button for document handling on a new AX Form. To add this functionality you may need to perform following steps.

Step 1. Open your form in AOT and Go to from Design node.

Step 2. Add new button group under ActivePanTab.

Step 3. Add new command button under this new button group.

clip_image001

Step 4. Set following properties of this button

clip_image002

Now you need to do one functional setup for this new customization

Step 5: Open below from
 Organization administration/SetUp-> Document Management -> Active Document Table

Step 6: Add your table details here and click on Always enable.

clip_image003

Step 7: So its done now.
Open your form and click on Attachment button , below form must open.

clip_image006
Enjoy……
Merry Christmas to all of you.

-Harry

December 08, 2014

Exam MB6-704 Microsoft Dynamics AX 2012 R3 CU8 Development Introduction Certification

Exam MB6-704 Microsoft Dynamics AX 2012 R3 CU8 Development Introduction Certification 
Hi Friends,

Microsoft just released one more certification for Dynamics AX 2012 technical. Its still not available for registration but soon (within couple of days) it will be available for all of us.

Here is some details about this exam.

Study Guide

80670: Development I in Microsoft Dynamics AX 2012 R3 CU8
80671: Development II in Microsoft Dynamics AX 2012 R3 CU8
Exam Topics:
Describe the Dynamics AX Architecture, Manage the Data Dictionary, and Manage the User Interface (30% - 35%)
Describe the Dynamics AX architecture
This topic may include: Identify the features of Dynamics AX; describe the architecture of Dynamics AX; describe the development environment; describe licensing and configuration; describe the model-driven architecture.
Manage the data dictionary
This topic may include: Work with MorphX and the application object tree (AOT); describe primitive and extended data types; create tables; work with indexes, relations, enumerations, and views.
Manage the user interface
This topic may include: Create forms; join data sources; create menu items; create forms from form templates; work with list pages and FactBoxes.
Work with X++ (35% - 40%)
Describe X++
This topic may include: Identify the characteristics of X++; develop by using tools, such as the debugger and the Compare Tool; describe best practices; implement reverse engineering.
Work with X++ control statements
This topic may include: Work with variables, operators, conditional statements, and loops; use built-in functions; use communication tools.
Manage objects and classes
This topic may include: Work with objects, classes, and inheritance; work with scoping events and parameters.
Manage exception handling
This topic may include: Work with exceptions and optimistic concurrency exceptions; work with throw and try/catch statements.
Manage Security and Database Access (30% - 35%)
Work with role-based security
This topic may include: Set up a new user; assign roles to users; change duties on a role; change privileges on a duty; assign permissions to a privilege.
Understand security for developers
This topic may include: Understand permissions and security policies; work with Code Access Security; use display method authorization.
Access the database
This topic may include: Retrieve data; manipulate data; work with queries.

Soon I will share more details about this new certification.

-Harry

October 30, 2014

Get Default Workflow list in AX 2012

How to Fetch Default Workflow list in AX 2012

Hi Folks,

Here is a job to fetch existing workflows in AX 2012.

static void TheAxapta_WFList(Args _args)
{
#AOT
Treenode                workflowTypesNode, workFlowNode;
int                     i;
int                     nodeCount;
str                     workflowName;
SysDictWorkflowType     sysDictWorkflowType;
SysDictWorkflowCategory sysDictWorkflowCategory;
;
workflowTypesNode = treenode::findNode(#WorkflowTypesPath);
nodeCount = workflowTypesNode.AOTchildNodeCount();
workFlowNode = workflowTypesNode.AOTfirstChild();
for (i=1; i<=nodeCount; ++i)
{
workflowName = workFlowNode.AOTgetProperty("Name");
try
{
sysDictWorkflowType = SysDictWorkflowType::newTypeName(workflowName);
sysDictWorkflowCategory = new SysDictWorkflowCategory(sysDictWorkflowType.category());
info(sysDictWorkflowCategory.label() + ";"
+ sysDictWorkflowType.label() + ";"
+ sysDictWorkflowType.help());
}
catch ( Exception::Error)
{
exceptionTextFallThrough();
}
workFlowNode = workFlowNode.AOTnextSibling();
}
}

Your output must look like below

image
- Harry






October 11, 2014

Another year...... MVP

Hi All, 
I would like to share this golden moment with you all, Again I’m awarded by Microsoft as Most Valuable Professional (MVP) this year as well.
Its third time in row when I recognized by Microsoft for Dynamics AX. 
Thanks to each of you for your guidance and support.   
Old Post:
1st Year Award

-Harry Follow us on Facebook to keep in rhythm with us. @Facebook

October 09, 2014

ValidTimeStateFieldType Property on Table- AX 2012 R2, R3

ValidTimeStateFieldType Property on Table- AX 2012 R2, R3

What is the use of “ValidTimeStateFieldType” property on table

Date effective data is tracked in a table that has its ValidTimeStateFieldType changed from its default value of None. Also, an index with its ValidTimeStateKey set to Yes must be added on the table. The system automatically adds the fields named ValidFrom and ValidTo to the table, which will be of type date or utcdatetime. The system automatically prevents overlap between the date ranges in these two fields among rows that track the same entity.

clip_image001

clip_image003

How to fetch records from this type of tables

The following code sample returns the records that are effective during 1/1/2001 and Current date:

static void theAxapta_ValidTimeState (Args _args)

{

vendTable vendTable;

TaxRegistration TaxRegistration;

DirPartyLocation DirPartyLocation;

date ToDate = today();

date FromDate = 01\01\2001;

while select validtimestate(fromdate, ToDate) * from TaxRegistration

join DirPartyLocation

where TaxRegistration.DirPartyLocation == DirPartyLocation.RecId

{

select vendTable where vendTable.Party == DirPartyLocation.Party;

info(strfmt(“%1”, VendTable.Name));

}

}

For more details

http://msdn.microsoft.com/en-us/library/gg861781.aspx

White papers

http://download.microsoft.com/download/4/e/3/4e36b655-568e-4d4a-b161-152b28baaf30/using_date_effective_patterns_ax2012.pdf

http://www.microsoft.com/download/en/details.aspx?id=20864

 

-Harry

September 17, 2014

Finding the current accounting currency code through X++ code

Hi Guys ,

Just sharing small trick to pull the current accounting currency through X++ code

here are three way to pull current currency,
1. currCode = Ledger::accountingCurrency(CompanyInfo::current());
2. currCode = Ledger::accountingCurrency(CompanyInfo::Find().recid);
3. currCode = CompanyInfo::standardCurrency();


Thanks-
Harry

September 08, 2014

Error while compiling the project after import

Error: After import a new project from another server, while compiling system gives below error message:


AX1004: Reference System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 was not a valid model assembly.
\C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll

Warning Message:

MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or
\C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
Line: 983

image

Possible Reason:

It might be your .net version.

Solution:

Install .net version 4 from below link

http://www.microsoft.com/en-us/download/details.aspx?id=8279

After installing this update this error should not come.

-Harry

September 02, 2014

Error while deploying SSRS report in Dynamics AX 2012 R3- An error occurred : The network path was not found. If User Account Control (UAC) is enabled on the machine, close the application, right-click the application, and then click Run as administrator.

Hi Folks,


Below are troubleshooting for Error while deploying SSRS report in Dynamics AX 2012 R3

clip_image001

Error 1:
The deployment was aborted. You do not have privileges to deploy to server: ######. For deployment, you must have administrative rights to the SQL Server Reporting Services (SSRS) server. Contact your administrator to deploy.

Error 2:
An error occurred: The network path was not found. If User Account Control (UAC) is enabled on the machine, close the application, right-click the application, and then click Run as administrator.

Solution:

Go to services-> Remote Registry and change the start type to automatic. And start the service.

clip_image002

Now deploy your report, it should deploy successfully.

clip_image003


Hope this will help you. Keep sharing your feedback under comment box. 
-Harry




August 31, 2014

Error While deplying SSRS report DAX 2012 R2/R3

 Hi Folks,

Here is one more troubleshoot for SSRS report. Please check my previous post for similar errors and solutions.

Error:

A call to the Microsoft Dynamics AX SRSFrameworkService service failed. There was no endpoint listening at net.tcp://####srv:8202/DynamicsAx/Services/BIServices that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.


Possible Reason: 
Inbound port deactivated.

Solution:

Go System administration > Setup > Services & Application Integration Framework > Inbound ports.

Select BIServices port and activate it.


While activating you may one more error, and we will fix this as well :)



For that please follow below,

Goto AOT > Service Groups > BI Services, double check it has two services

Also check both services have the underline service operations:

 
If everything is correct then U can right click on BIServices service group and say Deploy Element.  

Enjoyyyyyyyy…. !!!

-Harry

August 22, 2014

Error: When opening AX client

“The Microsoft Dynamics AX client cannot be started because more users are connected to the system than are allowed by the license.” 


Error: While opening the AX client system showing below error message.
“The Microsoft Dynamics AX client cannot be started because more users are connected to the system than are allowed by the license.”
However there is clearly mention in error that its an license issue, 
But the actual issue is we are not able to open the AX and without opening we can not change the license. Upppsss:).

clip_image001

This error should not come While there is only one user login the server and RDP.

SO to resolve this issue Try this:

1. Open SQL management studio
Run below query on AX data base

select * from sysclientsessions where STATUS = 1
there must be some records in this table

2. Stop AOS services
3. Now delete are records from this table
4. Now restart the AOS service and open the AX client.
5. You may need to change the license as well (If expired).

-Harry














August 11, 2014

Error: “The CIL generator found errors and could not save the new assembly.”

Error: “The CIL generator found errors and could not save the new assembly.”





Updated: April 19, 2016.

Error: When run full or incremental CIL , system showing below error
“The CIL generator found errors and could not save the new assembly.”

clip_image001

Possible reason: This might be CIL generation issue.

Suggested Solution:

Step I: Stop AX services

Step II: Delete all isolated files from below path (Please Note: Delete only files which are not in any folder)

C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory

clip_image003

Step III: Start AX service

Step IV: Synch DataDictonary

Step V: Full Compile

Step VI: Full CIL Compile

Note: These all operation must be perform in the same sequence. (I also tried this only :P )

Now try to reopen you AX client. It should be work.

Update: April 19, 2016
You can rename the exist folder (e.g. XPPIL_BackUp12042016) and than start your AOS and do a full CIL. Its more effective than deleting only outer files.

- Harry

August 06, 2014

Dynamics AX 2012 R3 Demo Data Installation

Dynamics AX 2012 R3 Demo Data Installation

Hi Friends,

Data importing is slightly different in AX 2012 R3, in earlier version can import data through SQL but now here is something new for us. 

Before performing below operation you should have following tools/Setups with you

1. Dynamics AX 2012R3 (of course it will be there :P )

2. Demo data file (downloadable from Partner source)
DynamicsAX2012R3DemoData.exe

3. Data transfer tool (downloadable from Partner source
AX2012TestDataTransferTool.msi

Ohk, now we have all the require setups with us, so let’s start now.

Step 1. Extract demo data file, run “DynamicsAX2012R3DemoData.exe

clip_image001
In this case I extract it on C drive.


Step 2. Run “AX2012TestDataTransferTool.msi” file.

clip_image002

It will create a new folder in under following path
C:\Program Files (x86)\Microsoft Dynamics AX 2012 Test Data Transfer Tool (Beta)

clip_image004

Step 3. Import “MetaDataXMLGenerator.xpo” , it will import a new job named “MetaDataXMLGenerator” in AOT, Run this job.

clip_image006

This operation will create a XML file names “MetaData.xml” under below path
(You can directly go this folder by using “%temp%” from run)
clip_image007

7/29/2014 5:00 PM - Screen Clipping
clip_image008

Step 4. Copy this file and paste is in “[List]” folder (where Test Data Transfer Tool has been extracted). If the file already exists, then overwrite the file. In this example path will be following
“C:\AX 2012 Test Data Transfer\[Lists]”

clip_image010

Step : 5 Close all AX instances and stop the AOS services.
Now you have all data and required files with you.

Step 6. Now run command prompt as administrator
Navigate to the directory where your “AX2012TestDataTransferTool” folder exist. In this case I have “C:\AX 2012 Test Data Transfer” (just copied from program files J )
clip_image012

Now the final stunt, Run following command
DP.exe IMPORT “C:\AXR3DemoData” AX2012R3DB
Pease note: Make sure all AX instance and AOS service are stopped.
Here
Ø “DP.exe” is executable file in “AX2012TestDataTransferTool” folder
Ø “C:\AX2012R3DemoData” is your demo data folder path
Ø “AX2012R3DB” is your AX database name
clip_image014
System will ask to your acceptance to import data, simply press “y/Y”


Note: Some time system will show below error

“Unhandled Exception: System.UnauthorizedAccessException: Access to the path ‘C:\Program Files (x86)\Microsoft Dynamics AX 2012 Test Data Transfer Tool (Beta)\DP Log.xml’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName)
at System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options)
at DP.Program.Execute(String currentDirectory, DataportDirection direction, S
tring directory, String database, String server, DataportAction action) in e:\bt
\110700\Source\DataPort\DP\Program.cs:line 182
at DP.Program.Main(String[] args) in e:\bt\110700\Source\DataPort\DP\Program.
cs:line 82


If you are facing the same error than try to run following command (Its same command as above without “ ”)
DP.exe IMPORT C:\AXR3DemoData AX2012R3DB
Now it will work J
As next, Below window will open
clip_image017
Here you done your part, now wait to complete this operation and open your AX client.


-Harry

June 04, 2014

Debugger is not working on RDP class – SSRS report-AX 2012

Hi Guys,

Here is another very common issue we might face any normal day,

Issue: 
While inserting breakpoint (By both “breakpoint” keyword and f9) , RDP Class not hitting by debugger in SSRS reports.

Solution: 
Here is a trip to do it
1. Open debugger manually
2. Put your breakpoint in code
3. Run code

Wowwwww its working now, isn't it….


-Harry

April 25, 2014

Microsoft Dynamics LifeCycle Services (LCS)

Microsoft Dynamics LifeCycle Services (LCS)

What is LCS?

Microsoft Dynamics Lifecycle Services provides a cloud-based collaborative workspace that customers and their partners can use to manage Microsoft Dynamics AX projects from pre-sales to implementation and operations. Based on the phase of your project and the industry you are working in, the site provides checklists and tools that help you manage the project. It also provides a dashboard so that you have a single place to get up-to-date project information.
Lifecycle Services is available to customers and partners as part of their support plans.


Ø  A cloud-based collaborative workspace.
Ø  Designed to manage and optimize customer implementations, powered by Azure cloud.
Ø  Customers and their partners can use to manage Microsoft Dynamics AX projects from pre-sales to implementation and operations.
Ø  Based on the phase of your project and the industry you are working in, the site provides checklists and tools that help you manage the project.
Ø  Provides a dashboard so that you have a single place to get up-to-date project information.


 Which industries LCS supports?

Lifecycle Services provides support for the following industries. The checklists and business processes that are available by default vary depending on the industry that is selected.
·         Public section
·         Retail
·         Manufacturing
·         Distribution
·         Services
·         Other


Available tools in LCS to manage DAX projects?

Ø  Business process modeler
Ø  Customization analysis
Ø  Upgrade analysis
Ø  Rapid Start service
Ø  RFP (Requests for Proposals) responses
Ø  Usage profiler
Ø  License Sizing estimator
Ø  System diagnostic service
Ø  Issue search

In coming post I will discuss each and every tool in details and also look more deeply about LCS and its functionality and all.
That’s all for now, please share your feedback and comments. It will really help to improve this blog.

-Harry