Skip to main content

Posts

Project management and accounting in Ax 2012

Error Removal of suspension of recId allocation for table VendInvoiceInfoTable has failed in axapta 2012

Problem: Error executing code: The field with ID '0' does not exist in table 'SalesPurchJournalLineExtension_IN'. Removal of suspension of recId allocation for table VendInvoiceInfoTable has failed. Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.    at Dynamics.Ax.Application.SysRecIdSequence.Removerecidsuspension(Int32 _tableId) in SysRecIdSequence.removeRecIdSuspension.xpp:line 23    at Dynamics.Ax.Application.formletterParmData.Removerecidsuspension() in formletterParmData.removeRecIdSuspension.xpp:line 15    at Dynamics.Ax.Application.formletterParmData.Catchall() in formletterParmData.catchAll.xpp:line 9    at Dynamics.Ax.Application.formletterParmData.Createdata(Boolean _append, Boolean ) in formletterParmData.createData.xpp:line 63    at Dynamics.Ax.Application.formletterParmData.Createdata(Boolean _append)    at Dynamics.Ax.Application.PurchFormletterParmDataInvoice.Createdata(

Table level best practices in Ax 2012

--> Set Title fields --> Create primary index --> Create basic methods like find, findRecId, exist. --> Add method documentation in every method. --> Method name should be camel casing --> Add BP deviation comment on every display or edit method. --> Create groups containing relevant fields. -->Run the BP check on your table (right click on table -> Add-ins -> Check Best Practices) and it will show the most crucial BP deviations you might have there. --> Use pascal casing for field names and table name.

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.