Code

Page ID: (AU204000)

On this page, you manage the Code items in the customization project. You can add the following Code items:

  • New Graph: A new business logic controller that is derived from the PXGraph<> class
  • New DAC: A data access class that is derived from the IBqlTable class
  • Graph Extension: A graph extension that is derived from the PXGraphExtension<> class
  • DAC Extension: A DAC extension (which is also referred to as a cache extension) that is derived from the PXCacheExtension<> class
  • Code File: Custom C# code
  • Customization Plug-in: A class that is derived from the CustomizationPlugin class
Tip: You open the Code page by clicking Code in the navigation pane of the Customization Project Editor.

Page Toolbar and More Menu

The page toolbar includes standard buttons and page-specific buttons and commands. For the list of standard buttons, see Page Toolbar. The page-specific commands can be shown as buttons on the page toolbar, as commands on the More menu, or in both places. These commands are listed in the following table in alphabetical order.

Button Description
Edit

Opens the Code Editor page for the Code item selected in the table. You click the row with the item and then click this button. (You can also open the Code Editor page by clicking the link in the Object Name column.)

Table 1. Create Code File Dialog BoxThis dialog box opens when you click Add New Record on the page toolbar.
Element Description
The dialog box has the following elements.
File Template

The type of the Code item that will be created.

You select one of the following options:

  • New Graph (default): To create a business logic controller
  • New DAC: To create a data access class
  • Graph Extension: To create a graph extension
  • DAC Extension: To create a DAC extension
  • Code File: To create custom C# code
  • Customization Plug-In: To create a class
Class Name

The name of the entity, which is one of the following, depending on the option selected in the File Template box:

  • If New Graph is selected in the File Template box, the class name of the business logic controller
  • If New DAC item is selected in the File Template box, the class name that corresponds to the name of the table created in the database
  • If Code File is selected in the File Template box, the name of the new class
  • If Customization Plug-in is selected in the File Template box, the name of the plug-in
Base Graph

The class name of the business logic controller.

This box is available only if Graph Extension is selected in the File Template box.

Base DAC

The DAC on which the DAC extension is based.

This box is available only if DAC Extension is selected in the File Template box.

Generate Members from Database

A check box that you select to indicate that a data access class will be generated with members that correspond to the table columns.

This check box is available only if New DAC is selected in the File Template box.

This dialog box has the following buttons.
OK

Adds the Code item to the table on the page and closes the dialog box.

Cancel

Closes the dialog box without any changes.

Table

This table lists the Code items in the customization project. The table contains the following columns.

Column Description
Object Name

The name of the Code item in the customization project.

Description

The description of the Code item.

Last Modified By

The name of the user who last modified the Code item in the customization project.

Last Modified On

The date when the Code item was last modified in the customization project.