January 09, 2015

How to add new fields/Methods in Listpage from in AX 2012

How to add new fields/Methods in List page from in AX 2012
Here we use the Production Order list page for example
Open Production order list page from below link
Production control/Common/Production orders/All production orders
clip_image002
Now we need to add one new field “Serial Number” in this grid (Assuming there will be only one item in one Production order in every case).
This serial number is available in “Transaction” from of this production order.
Untitled
Now to display new fields you can add a new display method in table and drag-drop this method in a grid as a field.
Add one new method in “ProdTable” table add copy below code
display InventSerialId inventTransInventSerialId()
{
InventTransOrigin InventTransOrigin;
InventTrans InventTrans;
;
select InventTrans join InventTransOrigin
where InventTrans.InventTransOrigin == InventTransOrigin.RecId &&
InventTrans.ItemId == InventTransOrigin.ItemId &&
InventTransOrigin.ReferenceId == this.ProdId &&
InventTransOrigin.ItemId == this.ItemId;
return InventDim::find(InventTrans.inventDimId).inventSerialId;
}
Now set DataSource property of this new field as ProdTable. Save your from and compile for any error.
Now open this from, here is your from
clip_image008

-Harry

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