To Customize an Existing Data Access Class
If you know the name of the data access class to be customized, you can create a Code item with the DAC extension template on the Code page of the Customization Project Editor by using the Create Code File dialog box.
To do this, perform the following actions:
- Open the customization project in the editor.
- Click Code in the navigation pane to open the Code page.
- Click Add New Record (+) on the page toolbar.
- In the Create Code File dialog box, which opens, select DAC Extension in the File Template box, as the screenshot below shows.
- In the Base DAC box, select the name of the data access class to be customized.
- Click OK.
The platform creates the template of the class that is derived from the
PXCacheExtension<> class, saves the code as a Code
item of the project in the database, and opens the item in the Code Editor.
Note:
Inside the
extension, you must implement the IsActive method which
enables the extension on condition. For details, see To Enable a DAC Extension Conditionally (IsActive).