Browsing all articles tagged with Development Archives - Amer Atiyah, Microsoft Dynamics 365 Blog
25

Developing applications is now easier and faster in the new Microsoft Dynamics AX 2012 than its earlier versions. .NET developers who are familiar with Visual Studio .NET will be comfortable with developing Dynamics AX applications although Dynamics AX has its own IDE which called MorphX and its own programming language with is X++.

This image shows the Dynamics AX AOT (Application Objects Tree), one of the MorphX IDE objects that Dynamics AX developers use to navigate through programming objects like Forms, Reports, and X++ Classes:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With Microsoft Dynamics AX 2012, you can view that AOT in the Microsoft Visual Studio 2012:

Dynamics AX 2012 Applicatoin Explorer in VS.NET

Proxies

Microsoft Visual Studio 2010 now creates proxies internally to support interacting with Microsoft Dynamics AX 2012 X++ classes, tables and base enums. By creating those proxies, developers will interact with Dynamics AX objects in C# and VB.NET exactly as if they are interacting with it in X++. After the proxy is created, that type is available as a strong type and features such as IntelliSense are available. For example, table fields and X++ methods are now exposed to be used in C# with one click. The created proxies are using .NET business connector internally to connect to the Dynamics AX objects.

The following pictures speak quietly how you can access and interact with Microsoft Dynamics AX 2012 objects from within Microsoft Visual  Studio 2010:

Adding Visual Studio Project to the Dynamics AX 2012 AOT

Visual Studio Project inside Microsoft Dynamics AX 2012 AOT

Adding a Dynamics AX 2012 object to the VS 2010 Creates an Internal Proxy

 

The CustTable Appears in the Solution Explorer. You Can Now Use the Dynamics AX CustTable Methods, Properties and Fields!

0

My AX Session at the ROCS2

Yesterday I provided an online session for the technical community in Saudi Arabia.

This session will be the beginning of a series of Dynamics sessions covering most of the technical areas like MorphX, Workflow, EP, Reporting… etc.

The session I gave yesterday provides an overview about the Dynamics AX from technical perspective. I described the Architecture, IDE, X++, EP, Reporting and BI, and Workflow.

You can download the PowerPoint file from here.

 

5

Populating Data from Different Companies

I came across a case where I needed to select a field value from different companies in Dynamics AX.

Simply what you have to do is the following (I choose ItemId to be taken from different companies as an example):

  1. Create a field in your table with an ExtendedDataType than has NO relation, MyNewItemIdEDT in our example
  2. Create an ItemCompany field, put the extended data type as dataAreaId
  3. Create a Relation in that table with the following elements (Normal relation elements):
    • <<NewTableName>>.MyNewItemId == InventTable.ItemId
    • <<NewTableName>>. ItemCompany = InventTable.dataAreaId

 

By this you would be able to select the ItemId field based on the selected dataareaid without writing any code even. :)

9

This topic might not be new to most of you guys, but I always wondered how can I create a primary key to a Dynamics AX table?

You could easily create index in any table in Dynamics AX and you could specify that this index is “not duplicated”, which means that values of the field(s) should be unique among the table values. But this does not mean that you this index is a Primary Key index!

To create a Primary key you have to set the PrimaryIndex property in the list of that table properties.

PrimaryIndex Property

When you choose the PrimaryIndex property you have to set that index as “not duplicated”. Once you do that, you will have the icon of that index changed to be like this:

Primary Key Index Icon

3

The New Dynamics AX 2011 X++ Editor

New features have already been added to the next version of Dynamics AX, Microsoft Dynamics AX 2011.

One of the very great features is the X++ Editor. I used to write X++ since Microsoft Axapta 3.0, there has been some slight changes between Axapta 3.0 to Dynamics AX 2009. But it looks that Microsoft is really doing the X++ editor looks somehow closely to the great editor of Microsoft Visual Studio .NET.

Some of the new features include:

  1.  Ability to see lines in code
  2. Improved IntelliSense features (all possibilities will appear once you type)
  3. Great ability to select words in editor without selecting the line from the beginning
  4. More colors
  5. Ability to check Labels value without going to the Label Editor
  6. .. and many more.

Check out this video :) You will enjoy it.

 

6
Sometimes you might face an unexpected error when trying to insert new records to any of the Dynamics AX tables. The message you might have is like: Cannot create a record in Journal lines (LedgerJournalTrans). The record already exists.
You might also have tried to check the indexes of this table that shouldn’t be duplicated. And you got surprised when you are not violating those constraints, so there is no any rational reason why this error might appear.
After so many tries, I got to fix that error by:
  1. Backing-up my database (just in case that anything went wrong)
  2. Exporting the data of that table (from the AX Import/Export functionality)
  3. Deleting/Dropping the table from the Microsoft SQL Server Management Studio (by this all the data of course will be deleted)
  4. Opening the Dynamics AX client, going to: AOT –> Data Dictionary –> Tables –> LedgerJournalTrans –> Right clieck –> Synchronize
  5. Importing the data again to all companies (from the AX Import/Export functionality.

As you could see, I got this error in a very critical table that is the LedgerJournalTrans table. This table contained already posted lines and it was really headache for me to get it fixed. But fortunately I was able to fix it by following the previous steps. :)

1

I had the opportunity to review the new Dynamics AX books that were published by PACKT publishing. Currently I’m reviewing them and I will update you once I finish. Till that time, I’m putting here the second chapter of Microsoft Dynamics AX 2009 Development Cookbook.

Enjoy :) !

1

Two Dynamics AX 2009 Development Books

Two new books have been published in the last period. Those books are talking about Microsoft Dynamics AX 2009 development.  Both are published by PACKT Publishing.

The first book: Microsoft Dynamics AX 2009 Development Cookbook (available in PDF)

 

This book talks about development in Dynamics AX in an exciting way that is discussing 60 of the common scenarios in Dynamics AX development that developers usually face. From the index of contents of this book I feel that it assumes that the reader knows a bit about how to deal with MorphX. I recommend this book for junior level technical consultants that they need to step forward after spending some time on MohrphX.

Here is a short description of what this book cover:

  • Explore data manipulation concepts in Dynamics AX – build data queries and modify the existing data
  • Build scripts to assist data migration processes
  • Organize data in Dynamics AX forms
  • Enhance your application by using advanced form controls
  • Create custom lookups using AOT forms and dynamically generate them from the X++ code
  • Create and post Dynamics AX journals from code
  • Create and manage purchase and sales orders from code
  • Create a custom electronic payment format and process a vendor payment using it
  • Integrate your application with Microsoft Office Suite
  • Create various MS Office documents that can be used for exporting/importing business data for further distribution or analysis

 

The second book is: Microsoft Dynamics AX 2009: Getting Started (available in PDF)

If you are new to Dynamics AX then you will like this book. I liked the way this book is structured. It encapsulates the complications that you might face in other materials and focuses on the things that you always are in need to. It starts with the very elementary basics of Dynamics AX development and goes forward up to integrating with other modules of Dynamics AX and external systems. I recommend this book for new AXers.

Here is a short description of what this book cover:

  • Get to grips with the AX Development environment
  • Understand the basics of the  X++ language
  • Reduce the time spent on coding by storing and relating data
  • Create Reporting Services reports in Visual Studio using the new Reporting Service extensions
  • Optimize data retrieval to ensure each transfer contains only the data necessary for the further operations
  • Manipulate data in X++
  • Effectively handle transaction scope by using different operators
  • Develop a .Net class in Visual Studio and then use it in AX
  • Build rich web portals with Enterprise Portal and ASP.NET
  • Optimize application performance and extensibility
  • Create services and expose them to external applications+
  • Build a new module in AX

Dynamics AX 2012 Event

Recent Posts

Tags

Archives

Random Testimonial

  • ~ Mohamad Al-Shami, Chief of Finance and IT at WorleyParsons

    shamiii"Amer Atiyah has provided us a full time support. His involvement has crossed project management, Installation, data migration, system analysis and design for Payroll. Amer has a proven "can do" attitude and prepared to roll up his sleeves and get the job done. He has, and are continuing to, assist us with the successful delivery of our Dynamics AX ERP Implementation."

  • Read more testimonials »