New version of the task recorder has been released
A new version of the task recorder has been released. New features: – Video capturing of tasks (might be handy for support and training purposes) – The ability to generate a package for the business process modeller in Lifecycle services (not exactly sure what this means but it might be useful) link in case you’re interested. http://www.microsoft.com/en-us/download/details.aspx?id=39353
Overview of AX build numbers
Most of the times when we start working with new clients and are being asked to update their systems with new requirements. We start looking into which version of AX is installed? what is the build version ? Have any hotfixes installed on it or have any one installed any rollup or commulative update in the system. Many a times response from clients is “We really don’t about it!”. Below link can help you to find out answers of these questions yourself quickly; http://blogs.msdn.com/b/axsupport/archive/2012/03/29/overview-of-ax-build-numbers.aspx
How to display dimension combination values name in AX 2012
Dimension combinations are stored are DimensionAttributeValueCombination class. But they are stored as a combination for example: (100010-AX-00001- – – -). How would you know the value in each combination belongs to what dimension? This was one of my requirements to find name against each dimension combination values and display it on Trial Balance screen. The answer is through dimension storage class. This class is used to manipulate these combinations. The code below helps you in finding out the required values.
“How Do I” Videos — Dynamics AX
“How Do I” Videos — Dynamics AX Read full post at Dynamics AX Developer Centerhttp://msdn.microsoft.com/en-us/dynamics/ax/cc507280 “How Do I” Videos — Dynamics AX On this page you will find videos designed for all Microsoft Dynamics AX developers, from the novice to the professional. New videos are added regularly, so check back often. Forms Series This how-to video series is focused on forms and their features in Microsoft Dynamics AX. How Do I: Link Parent and Child Forms by Using Dynamic Links?(6 minutes, 47 seconds) Enterprise Portal Series This how-to video series is focused on Enterprise Portal and its features in MicrosoftDynamics AX. How Do I: Use Record Context in Enterprise Portal?(14 minutes, 51 seconds) How Do I: Create a Simple List Page in Enterprise Portal?(4 minutes, 52 seconds) How Do I: Create a Simple Task Page in Enterprise Portal?(4 minutes, 39 seconds) How Do I: Create a Simple Wizard Page in Enterprise Portal?(7 minutes, 39 seconds) How Do I: Call an X++ Class From an EP User Control?(7 minutes, 26 seconds) How Do I: Add a Range to a Dataset in an EP List Page?(5 minutes, 13 seconds) Enterprise Portal Deployment Webinar(48 minutes, 04 seconds) Enterprise Portal Development Webinar(73 minutes, 49 seconds) How Do I: Set Up EP in an NLB Cluster?(11 minutes, 34 seconds) User Interface Series This how-to video series is focused on user interface features in Microsoft Dynamics AX. How Do I: Navigate the Client User Interface?(8 minutes, 53 seconds) Integration Series This how-to video series is focused on development features that enable integration with Microsoft Dynamics AX including Application Integration Framework (AIF) and Business Connector. How Do I: Create a Custom AIF Pipeline Component?(7 minutes, 28 seconds) How Do I: Integrate an Application Using .NET Business Connector?(4 minutes, 46 seconds) How Do I: Send the Chart of Accounts Electronically?(6 minutes, 04 seconds) Database Series This how-to video series is focused on the database features in Microsoft Dynamics AX. How Do I: Use X++ SQL Select Statements?(5 minutes, 54 seconds) Reporting Series This how-to video series is focused on reporting features in Microsoft Dynamics AX. How Do I: Create a Report Using MorphX?(7 minutes, 28 seconds) How Do I: Troubleshoot Role Center Reporting Errors?(11 minutes, 18 seconds) How Do I: Debug Microsoft Dynamics AX SSRS Reports with Visual Studio 2008?(9 minutes, 45 seconds) Miscellaneous Series This how-to series contains videos about various features in Microsoft Dynamics AX and related content. How Do I: Navigate the Developer Center?(3 minutes, 50 seconds) How Do I: Apply a Hotfix to an Installation?(7 minutes, 46 seconds) *Shared from Dynamics AX Developer Center.
How to add financial dimension on forms inside AX 2012
Add financial dimension on forms inside AX 2012 1. Perform a) Open AOT>>Data Dictionary>>Extended Data Types type/select DimensionDefault and drag it in table which will be used further as a datasource in form where you have to show the Dimensions. Do Remember that you have to drag it in table not at DataSource. b) Open Table in the Data, Dictionary which will be used as a Datasource, and create a realtion with table DimensionAttributeValueSet . c) Right Click the Relations. Select ‘New Realation’. Select properties. Set name as DimensionAttributeValueSet, Table as DimensionAttributeValueSet. d) Right Click the this newly created Relation DimensionAttributeValueSet, select New>>Normal. e) Set the properties of Normal Realtion as: Field=TheFieldwhichwillsaveDimensionNumberInYourTable Source EDT= DimensionDefault Related Field=RecId 2. Verify that the table that will hold the foreign key to the DimensionAttributeValueSet table is a data source on the form(the one on which you have to show dimensions). 3. Create a tab that will contain the financial dimensions control. This control is often the only data shown on the tab because the number of financial dimensions can be large. 4. set properties of Tab as under a) Set the Name metadata of the tab to TabFinancialDimensions. b) Set the AutoDeclaration metadata of the tab to Yes. c) Set the Caption metadata of the tab to @SYS101181 (Financial dimensions). d) Set the NeedPermission metadata of the tab to Manual. e) Set the HideIfEmpty metadata of the tab to No. 5. Override the pageActivated method on the new tab public void pageActivated() { dimDefaultingController.pageActivated(); super(); } 6. Override the following methods on the form. class declaration public class FormRun extends ObjectRun { DimensionDefaultingController dimDefaultingController; } init (for the form): public void init() { super(); dimDefaultingController=DimensionDefaultingController::constructInTabWithValues( true, true, true, 0, this, tabFinancialDimensions, “@SYS138487”); dimDefaultingController.parmAttributeValueSetDataSource(myTable_ds, fieldstr(myTable, DefaultingDimension)); } 7. Override the following methods on the form data source public int active() { int ret; ret = super(); dimDefaultingController.activated(); return ret; } public void write() { dimDefaultingController.writing(); super(); } public void delete() { super(); dimDefaultingController.deleted(); }
AX 2012 Developer Resources
AX 2012 Developer Resources This page collects the AX 2012 Development Articles available at blog, as well as the most relevant links to Microsoft documentation. They are arranged by topic. You will find duplicate links for articles that touch multiple topics.General TopicsMicrosoft Guide: What’s New for Developers (download) [fixed link – thanks to reader Waldemar Pross]Microsoft Guide: New, Changed and Deprecated Features (download)Microsoft Whitepaper: Deploying Customizations Across Environments (download)Dynamics AX 2012 System Requirements (download)Deploying AX 2012 CodeImporting Data Using the Excel Add-InsX++ LanguageX++ as a Managed Language in the .NET Runtime (code walkthrough)AX 2012 X++ Language Changes, Stricter Syntax (MSDN Article).NET Interop to X++ Issues when X++ runs as CIL (MSDN Blog)Deploying AX 2012 CodeNew Query Object Features (code walkthrough)Creating Code Snippets and method templates (code walkthrough)Data AccessComputed View Columns (code walkthrough)Valid Time State/Date Effective Framework – Part 1: Creating the table (code walkthrough)Valid Time State/Date Effective Framework – Part 2: Querying time state tables (code walkthrough)Microsoft Whitepaper: Using Date Effective Patterns (download)DebuggingDebugging X++ Running in CLR using Visual Studio (code walkthrough)EventsIntroductionEventing Basics (code walkthrough)Managed Handlers for Pre/Post events (code walkthrough)Managed Code Handlers for Delegates (limitations) (code walkthrough)Microsoft Whitepaper: Eventing (download)Eventing Terminology and Keywords (MSDN Article)Naming Conventions for Delegates and Event Handlers (MSDN Article)ReportingMultiple instances of Reporting Services on the same machine (TechNet Article)Microsoft Whitepaper: Report Programming Model for Dynamics AX 2012 (download)SysOperation FrameworkFrom RunBase to SysOperation: Business Operation Framework (code walkthrough)From RunBase to SysOperation: Business Operation Framework (SysOperation query and customizing BOF dialog) (code walkthrough)MSDN SysOperation Framework (MSDN Article)SysOperation Framework Whitepaper (download)Foreign-Key Table RelationshipsRecIds as Foreign Keys (code walkthrough)Microsoft Whitepaper: Migrating EDT Relations (download)UnitOfWorkUnit of Work Magic (code walkthrough)Table InheritanceMicrosoft Whitepaper: Developing with Table Inheritance (download)Model ArchitectureModels and Layers Basics (code walkthrough)Powerful Combination of Models and Events for No-Merge Code Solutions (code walkthrough)Deploying AX 2012 CodeManaged CodeUsing Visual Studio 2010 with AX 2012 (code walkthrough)Writing and Calling Managed Code from AX (code walkthrough)Limitations for Managed Code Event Handlers (code walkthrough)Proxy Classes Gotcha (code walkthrough)Creating Proxies for Kernel Classes (classes not visible in the AOT) (code walkthrough)Microsoft Whitepaper: Selecting the Best Development Technology for Your Scenario (download)X++ as a Managed Language in the .NET Runtime (code walkthrough).NET Assembly Deployment in AX 2012.NET Interop to X++ Issues when X++ runs as CIL (MSDN Blog)ServicesFrom RunBase to SysOperation: Business Operation Framework (code walkthrough)Using System Query Service in WPF (code walkthrough)MSDN Business Operation Framework (MSDN Article)Microsoft Whitepaper: Services (download)Consuming External Webservices (code walkthrough)Trusted Intermediary in AIF (code walkthrough)SecurityTrusted Intermediary in AIF (code walkthrough)Microsoft Whitepaper: Developing Extensible Data Security Policies (download)Microsoft Whitepaper: Using The Policy Framework (download)Various10-minute AX 2012 App: WPF (code walkthrough)10-minute AX 2012 App: Windows Azure (code walkthrough)10-minute AX 2012 App: Windows Phone 7 PART1 (code walkthrough)10-minute AX 2012 App: Windows Phone 7 PART2 (code walkthrough)10-minute AX 2012 App: Windows Phone 7 PART3 (code walkthrough)app.html For more info – http://daxmusings.blogspot.in/p/microsoft-dynamics-ax-2012-developer.html
“Error when executing direct SQL – SqlStatementExecutePermission”
While accessing SQL statements within AX world I came across an error which was really time consuming for me to get rid of. I created a method like this; It got failed while executing statement and gave following error ” Error when executing direct SQL – SqlStatementExecutePermission” on line resultSet = statement.executeQuery(sql); SOLUTION: You can solve this issue easily, if you use the method marked as server static and call this method from the display method.
Dynamics AX 2012: “Precision lost” warning message
This post is copied from Peter Villadsen blog and I thought to share it on my blog too. It really helped me a lot. A question came up at today’s webinar where a developer had a (presumably legitimate) reason to cast a real value into an integer value. The X++ language does not allow explicit casting (there’s no support for it in the language), but the compiler will do its best to satisfy the user and do the conversion on its own. In this case, however, it issues a warning message, lest this is not what the user wanted. One solution is to use the anytype type to hold the vaue for conversion and then using the any2int function, as shown below: static void Job47(Args _args) { real r = 3.13; int i = r; // Warning is issued here anytype a; a = r; // Assign to an anytype variable… i = any2int(a); // … and back into an int print r; print i; pause; } This should be packaged into a function, maybe called int RealToInt(real arg). Another way would be doing the conversion in managed code (through the System.Convert::ToInt32(object) method), but the performance will not be as good because of the marshalling that needs to take place. I hope this helps.
Code for Traverse between Tables and all the fields
With reference of Bineet’s blog here I found the code for Traverse between tables and all the fields. //Travese between tables and for each table traverse between all the fields static void TeeNode_traverse(Args _args) { TreeNode treeNode, treeNodeTable; TreeNodeIterator iterator; void traverseFields(TreeNode _treeNode) { TreeNode parentNode; parentNode = _treeNode.AOTfindChild(‘Fields’); //treeNodeTable = _treeNode.AOTfirstChild(); iterator = parentNode.AOTiterator(); parentNode = iterator.next(); while(parentNode) { //treeNodeTable = treeNodeTable.AOTfirstChild(); parentNode = iterator.next(); } } ; treeNode = TreeNode::rootNode(); treeNode = treeNode.AOTfirstChild(); treeNodeTable = treeNode.AOTfindChild(‘Tables’); treeNodeTable = treeNodeTable.AOTfirstChild(); while(treeNodeTable) { traverseFields(treeNodeTable); treeNodeTable = treeNodeTable.AOTnextSibling(); } }
How to get table name and number of records in each table in AOT
Today, I came across a requirement to find out the name of each table in AOT along with the number of records for each table. Here is the code to achieve this functionality; void getTableNameRecordCount(Args _args) { #AOT Name name; NumberOf recordCount; TreeNode treeNode; SysDictTable sysDictTable; ; treeNode = TreeNode::findNode(#TablesPath); treeNode = treeNode.AOTfirstChild(); while (treeNode) { name = treeNode.AOTname(); sysDictTable = SysDictTable::newTableId(treeNode.applObjectId()); recordCount = sysDictTable.recordCount(false); if (recordCount) info (strfmt(“@SYS26868”, name, recordCount)); treeNode = treeNode.AOTnextSibling(); } }