Skip to main content

Posts

Difference between run and main method in Microsoft dynamics ax 2012

Main is the entry point of a class, you can use it as a constructor method of your class, depending on the argument you can instantiate a new child class and return it's object. Run is used to write the code to process the business logic for that class In addition to that, Main is recognized by kernel and is executed when you call that class from the Menu item. On the other hand, Run is just a user defined method that by design should be used to execute the main job of the class.

Surrogate key in Axapta

A surrogate key is an artificial value that has no meaning to the user, but is guaranteed to be unique by the database itself.  Surrogate key is like an Index defined by the application.And RecId is automatically populated by ax for reference purpose in table level.If you didn't specify any primary index then system will specify one default index called surrogate key. If You did not defined any index for the table directly take recid as surrogate key.

Code to Create journal in ax 2012

Table group,Type,System,shared table in Ax 2012

->> Table group. The TableGroup property of a table can be used to choose tables to include in definition groups for export.   It can also be used to determining  which types of tables should be held in the record cache. ->> Table type. The  TableType property of a table determines where the table is stored. The options are:    --->> Regular: stored in the Microsoft Dynamics AX database.    --->> TempDB: stored in the TempDB database.  When you restart an Application Object Server instance or database, all  tables in the TempDB database are dropped and recreated.   -- ->> InMemory: held in memory only during the current Microsoft Dynamics AX session. ->> System table. A table that is used by the Microsoft Dynamics AX system, not for customer data. ->> Visible. A table that is visible in the AOT. ->> Shared (SaveDataPerCompany = No). Shared tables are used by multiple companies. Tables that are not shared pertain   to a single

How to get AOT element in current layer by code in axapta

To get AOT element in current layer by code in axapta you can  get help from below code. You can get other layer element by change enum value of utillevel. UtilElements _UtilElements; while select _UtilElements where _UtilElements.recordType == UtilElementType::ExtendedType && _UtilElements.utilLevel == global::currentAOLayer() { info(strfmt("%1",_UtilElements.name)) ; }

Show All table types in Axapta

These are All table types in Axapta 2012. You can get all table type on import form. If you want to export data for only master tables then you need to create definition group of master table type then export data. 1. Framework Tables 2. Group Tables 3. Main 4. Miscellaneous 5. Parameter 6. Reference 7. Transaction 8. TransactionHeader 9. TransactionLine 10. Worksheet 11. WorksheetHeader 12. WorksheetLine Same way you can get transaction type data by creating definition group of transaction type tables.