Posts

Showing posts from January, 2018

How to find MainAccount with LedgerDimension (X++)

Hi, i will show you how to get the MainAccount record with the LedgerDimension. You can use "DimensionStorage" class to achieve this. Below code finds the whole Main Account record with a ledgerDimension RecId. DimensionStorage dimStorage; MainAccount mainAccount; MainAccount = DimensionStorage::getMainAccountFromLedgerDimension(ledgerDimension); //Parameter as the LedgerDimension RecId

Simple Find method

Hi, i'm going to show you how to write a simple find method on a table. The purpose of writing a find method is to select the needed fields in a table, related with the data that you have in your hands. Find method is a "select" query actually that returns an entire table row or just which data you need from that table row. You send the parameters with the called find method and you return the entire table or which field you want. The below code is an example for a find method. This method must be written in your table then it can be called in every needed place like "ExampleTable::find()" , and giving parameter in the method. In the below code, we have an "exampleId" data in our hands that we can send as method parameter. In return of the method, we have the "exampleTable" entire data. If needed, you can also update this table after finding the required data. (This is optional). static exampleTable find (ExampleId _exId, boolean...

How to find Company Logo (X++)

In this blog i will tell you how to take company logo with X++ code. Below code returns Company logo as image file. Write this code in a new method in your white paper report and just drag and drop it to create the related object as a bitmap object. display Bitmap companyLogo () { CompanyInfo companyInfo; companyInfo = companyInfo::find(); return CompanyImage::findByRecord(companyInfo).image; }

Visual Studio SSRS Report design with AX Classes and TMP table

Image
Hello, I will try to explain how to design SSRS reports in Visual Studio and deploy to Axapta 2012 system... You need to have a Visual Studio installation with the Dynamics Ax 2012 visual studio tools installed. To open the visual studio as connected to your AOS; you can use a modified shortcut. To achieve this; -           Go to your Visual Studio folder (standard is “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\” ) -           Find “devenv.exe” and send a shortcut to your desktop. -           Right click on shortcut è   properties and add the following command at the end of the “Target” field after leaving a space; “/AxConfig AXC file path”.  AXC file is the configuration file of the AOS you are using. After this, open Visual Studio and select “New Project è Microsoft Dynamics AX è Report Model.” ...

Application Object Layers (Dynamics Ax 2012)

Image
I’m going to explain the layers system in Dynamics Ax 2012. I will make some quotations from Microsoft official site about the Application Object Layers and try to explain by adding my own notes. Application object layers hold everything that is displayed in the Application Object Tree (AOT).  Layers are a hierarchy of levels in the application source code that enable you to make modifications and additions without interfering with the application objects in the next lower level. When you make an object modification on one level, the modification overshadows the object on a lower level.   For example, when you edited an object on a level, changes made are stored on that layer.  If you want to turn to original object, you can just delete the object on modified layer. You can see which layer are you working on by the bottom right corner of the Axapta window in the development workspace (Ctrl+D). System standart lowest level is SYS layer and upper lev...

Creating an SSRS report with classes

Image
Hi, i will explain creating an SSRS report with classes and visual studio designs. There must be 3 main (controller,contract,DP) and 1 optional classes (UIBuilder) if parameters needed. Also 1 Temporary(TMP) table required to fill and then select data for the report. 1) Controller class is required for specifying the arguments(args) and the SSRS report name and the design. 2) Contract class is the parameter class. This class is used to return values. 3) DP class contains processReport method to fill a Temp table (TMP) and this table will be used to select data for the report. 4) UIBuilder class is used; if more parameters are needed. This class is used to create a dialog box that is helpful for the users who wants to call the report with specific parameters as selected. Create a table with "TMP" suffix and create the fields for the required data that will be selected in the report. Go to table properties and check the "CreatedTransactionId...