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 :-)

Calling Sequence Of Methods In FORM Level in Ax 2012

Hi Every one, today i would like to share my knowledge on Calling Sequence Of Methods in Form Level. Each form has a set of standard methods. You can override these methods to change the behavior of the form, respond to user interface events, and customize the appearance of a form.There are also methods on each form data source and on each form control.
Below scenarios gives the information of  method calls in the form level 
  1. Opening the Form.
  2. Creating/Updating/Deleting the record in the Form.
  3. Closing the Form.