Skip to main content

Posts

Showing posts from July, 2014

steps to debug standard Forms and class in Microsoft dynamics ax 2012

It depends on your requirement. If its list page form then you can debug it in its interaction class. If its normal form then follow these points. 1. Enable debugging in server configuration 2. Press F9 on the line of code you want to debug 3. You can also write break point keyword on the line of code you want to debug. 4. Restart the form 5. To debug line by line you can press F10 if you want to debug sub method then you can press F11.

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