Saturday, 28 November 2015

How to Generate a new DAC for Custom Table or View

Hi Everyone,

In Acumatica 5.2 we have a very nice feature where you can generate a Data Access class from the table definition just from Customization Browser UI.

To do this, go to the Customization Manager, open code section and create a new code file of type IBqlTable. If you specify a name of existing table, system will automatically load a definition for all fields from database.
IBqlTable is required interface for all data access classes in Acumatica. System will use it as a flag to understand what name should be used for table during SQL generation.
Acumatica Browser DAC Generator

When you click OK, system will analyze table structure and generate new DAC with all fields and appropriate attributes. All these stuff is done according to Acumatica naming convention.
Acumatica Auto-Generated DAC in Browser

And of course, you can always move this code file to extension library, if you need to use it with Visual Studio.

Have a nice customization!

No comments: