Sunday, March 25, 2012

"unchecked" Keyword in AX 2009


There is a keyword in X++ named unchecked that if used together with the uncheck::TableSecurityPermission enum value allows to turn off the effect of AosAuthorization for a specific code block.


This is used to turn off the security permission for a user whenever the data is inserted into a table using business logic.
 unchecked(uncheck::TableSeurityPermission)
   {
      object.insert();
   } 



You can also find this code in AX 2009 in some of the classes.For example,
Goto Classes --->LedgerTransferOpening--->insertClosingTrans(),you can find the below piece of code in the last line.



// allow any user to insert by turning security permissions off
            unchecked(Uncheck::TableSecurityPermission)
            {
                ledgerTrans.insert();
            }













Wednesday, March 21, 2012

Application object layers in different versions of AX



The four layers DIS / DIP / LOS / LOP from Microsoft Dynamics AX 4.0 have been renamed to HFX / SL1 / SL2 / SL3 in Microsoft Dynamics AX 2009.
The six layers DIS / DIP / LOS / LOP / BUS / BUP from Microsoft Dynamics AX 4.0 have to be renamed to FPK / FPP / SLN / SLP / ISV / ISP in Microsoft Dynamics AX 2012.


The six layers HFX / SL1 / SL2 / SL3 / BUS / BUP from Microsoft Dynamics AX 2009 have to be renamed to FPK / FPP / SLN / SLP / ISV / ISP in Microsoft Dynamics AX 2012.