Showing posts with label In ax 2012. Show all posts
Showing posts with label In ax 2012. Show all posts

Table Inheritance In Microsoft Dynamics Ax 2012

Table Inheritance :

  • A table can extend from or derive from another table. Each table has the SupportInheritance property and the Extends property, which together control table inheritance.
  • The default for each new table is to implicitly extend from the Common table. The extension from the Common table cannot be set or seen in the Extends property. A variable that is declared of a specific table also implicitly inherits methods from the xRecord class.
  • In the terminology for table inheritance, we say that the derived table extends its base table. But we never use the terms parent or child to explain tables in an inheritance relationship. The terms parent and child can be used to describe foreign key relationships between tables.
  • In Microsoft Dynamics AX, a table can inherit from another table. The AOT node for each table has the Extends property which you can use to derive your table from a table that you specify. 

Table inheritance is mainly controlled by the following properties:

  1. SupportInheritance – specifies if a table is a part of a hierarchy.
  2. InstanceRelationType – specifies the field that is used as a type discriminator. TableIds of concrete types are used as values of the InstanceRelationType field.
  3. Abstact – specifies if a table is abstract. Tables without derived tables cannot be abstract.
  4. Extends – specifies table’s parent.

Difference Between LinkType and JoinType in Dynamics Ax 2012

Hi Everyone today i would like share information on Link types and Join Types. 
  • Link type is a property of the form data source. We can add more than one tables as a data source to the form.
  • Those data sources should have the table level relation, So, that the developer don't need to work on the coding part to find the related records. 
For example, if we create the order form, that order form has orders and orderdetails tables as form data sources. We can add both tables as a data sources to the form.

Link Type:

  •  Active:  Parent and child- data source is updated immediately when a new record in the parent data source is selected. Continuous updates consume lots of resources consuming.

CrossCompany Vs ChangeCompany In Dynamics Ax 2012

Hi Everyone today i would like share information regarding how to retrieve data from Selected companies or from a specified company by using Keywords known as CrossCompany and ChangeCompany in Dynamics Ax, with a simple example.  

CrossCompany :  By using this keyword we can retrieve data from multiple selected companies or from all companies.
Example:-  We'll be using the well known demo data table (i.e, CustTable).

                    CustTable                 custTable;
                    Container                  con;
                 // Assigning the required Companies to the container 
                    con = ["CEU","DAT","CEE"];
                // CrossCompany:Object is the syntax for using CrossCompany keyword
                    Select crosscompany:con custTable;
                    
info( strfmt("%1",custTable.accountnum));

ChangeCompany : By using this keyword we can change company any time and retrieve data from specific companies. 

For Easy Understanding: Let say i'm in the CEU Company and i would like to get the data belonging to the CEE Company. Then i would Prefer to Use ChangeCompany Keyword.

Example:-
                    CustTable                 custTable;
                    Select * from custTable;
                    
info( strfmt("%1",custTable.accountnum));
//Accessing the data from a specified company by using the ChangeCompany Keyword
// changecompany("Company Name")  is the Syntax for ChangeCompany Keyword.
                    changecompany("CEE")
                    {
                        
custTable = null
                        Select * from 
custTable;
                        
info( strfmt("%1",custTable.accountnum));
                     }
// Retrieving from another selected Company
                    changecompany("CEEU")
                    {
                         
custTable = null
                         Select * from 
custTable;
                         
info( strfmt("%1",custTable.accountnum));
                     }                    

Proud To Be a DAX Developer :-)

What Is The Difference Between OCC and PCC in Ax 2012

Optimistic Concurrency Control (vs) Pessimistic Concurrency Control

Pessimistic Concurrency Control :
                                                    On updating the data, the record gets locked and no one else can access that record for updating. It becomes a read-only record till the lock is released. Once the lock gets released, the record can be locked again and get updated for a different user.

Optimistic Concurrency Control :
                                                    This allows multiple user to open up the same record for updation . Record gets locked only while updating the record. This is the most preferred way of locking for the web application.

Proud To Be a DAX Developer :-)

What Is: The Difference Between MapIterator and MapEnumerator In Ax 2012

Hi Friends, 
                
To day i would like to share info about MapIteratot and MapEnumerator, 1st thing to know is that in Ax 2012 "MAPS" are of two types,
1. X++ Maps:
                It can be used as a temp data store for the given scope of a process. This takes us less over head, and is much quicker than a TempTable. For Further reading.
2. AOT Maps:
                 A map can unify the access to similar columns and methods that are present in multiple tables. You associate a map field with a field in one or more tables. This enables you to use the same field name to access fields with different names in different tables. Methods on maps enable you to create or modify methods that act on the table fields that the map references

Difference is mentioned below:

MAP-ITERATOR:   The Mapiterator loops through the complete Map.
MAP-Enumerator: Map Enumerator class is like map iterator Class ,But allows the deletion of elements during enumeration where as mapiterator does not.

Proud To Be a DAX Developer :-)

SSRS Tip: Creating Multiple Data Regions In SSRS Reports

Hi Friends,
Today i'll demonstrate how to create multiple data regions/ groups in SSRS reports. A data region in simple definition is a subreport report that shares the parameters and datasets, and is present inside the report design itself. 
  • This and the following procedure will help you understand how multiple data regions can be created in SSRS. The first of the two data regions will display the detailed customer transactions.
Note: 1. 1st we have to create a query using CustTrans and CustTable tables and with following fields as shown below.
           2. We are using "AutoDesign" report while creating reports.  
  • Create a PktCustTransList query, which includes the CustTable and CustTrans tables. Remove the unwanted fields and retain only the fields that are shown in the following screenshot:

  • Open Visual Studio and create a new Report Model Project named PktCustTransReport and create a dataset that refers to the PktCustTransList query.
  • When selecting the fields in the query window, select all the fields and the name data method from CustTable.

How To: Create Related Field Fixed Relation In Ax 2012

Hi Friends,
Creating Relations in Ax 2012 is not that much difficult, today ll see how to do it in "3 Simple and Easy Steps" . Lets Start
Note: An Xpo for this example is provided at the end.


Step 1:




  • Create a BaseEnum  as AccTypeId , with elements as below 
  •             > Customer  - 0
                > Vendor      - 1




    • Create a EDT as AccTypeEDT and in the propertie's you will find a property as EnumType:   Set it to : AccTypeID(Our BaseEnum)



    Let say you have 3 tables as following:
    1. AccTypeTable.
    2. CustomerDetails.
    3. VendorDetails.

    Step 2:
    • Now create  table  AccTypeTable with fields AccountNum(String), AccType(Enum), DepartmentBelongs(String).
    • Note: When Creating AccType Field create a enumType field and in the properties find ExtendedDataType and fill that with our AccTypeEDT witch we created in step 1.

    How To: Use Date Effectiveness Feature in Ax 2012

    • Date effectiveness is a new feature in Dynamics AX 2012 allowing developers to easily create date range fields.
    •  Date ranges are used for defining record validity between the specified dates, for example, defining employee contract dates.
    • This feature significantly reduces the amount of time that developers spend writing code and also provides a consistent approach to implement data range fields.

    Note: > We will implement date range validation on the standard E-mail templates form.
              > This Example(Data, Tables, Forms etc etc) is given on the base of Contoso Domain
              > You ll also find an Xpo File To Download at the end of the example.
              > While importing into your AOT it ll ask for replacing the existing one, you can replace it with the new table and form. 

    Procedure:





  • 1. In the AOT, find the SysEmailTable table and change its property as shown below 
  • :
  •  






  • Property --> 
  • ValidTimeStateFieldType : Date

    2. Notice the two new fields that are automatically added to the table :




    3. Add the newly created ValidFrom and ValidTo fields to the existing emailIdIdx index
    and change the properties shown in the following table:


    4. The index should look similar to the following screenshot:

    Microsoft Dynamics Ax Major Features of Next Release (RAINIER)

    Feature's:

    The next major release of Microsoft Dynamics AX is code named Rainier. It is a new cloud optimized platform for deployments in private and public cloud as well as on-premises.

    1. Cloud Based Solutions.
    2. Platform independence - Browser enabled client's.
    3. AD (Active Directory) Federation and more integration with Azure.
    4. More investments on Visual Studio (Development Environment will be VS).
    5. Application Development targeting any OS through Rainier.
    6. No longer need to invest on Sharepoint hosting as Enterprise portal will be eliminated.
    7. 3 key pillars - New client, Cloud Readiness, New Development Stack.

    How To: Import & Export a Model In Dynamics AX 2012 Using Windows PowerShell Commands in Ax 2012

    Exporting an .axmodel File (Windows PowerShell)

    Procedure: 

    1. Click On the Start menu -->point to All Programs
    2. Point to Administrative Tools, & then click Microsoft Dynamics AX Management Shell.
    3.  A Command Prompt will Appear After clicking Management Shell 
    4. At the Windows PowerShell command prompt PS C:\>,
    5. Type the following command, and then press ENTER.

    Ax 2012 R2 Installation Setup Step By Step

    Step By Step Procedure: 



    Hello Friends,
    Here we are have  24 Easy and Simple  Installation Wizard Overview on AX 2012 R2.
    Note:  Make Sure The your P.C/ Laptop Is Connected to Internet.

    1) Open the Setup Program/Setup Wizard.

     2) Click "Microsoft Dynamics AX Components" under Install.


     3) Click Next.

    SSRS Tips: How To Get GrandTotal Using Autodesign in SSRS Report

    Procedure:  3 Simple & Easy Step's


    1. Open Property Window Of AutoDesign Node In Your Report.
    2. Set The "GrandTotal" Property To "Yes".
    3.That's it , It will Take care of the printing the total .

    Proud To Be a DAX Developer  :-)