Code

You use the Code page of the Customization Project Editor to manage Code items in the customization project. On the page, you can perform the following operations with items:

  • Add a new Code item of any of the following subtypes to the project:
    • 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 PXBqlTable class and the IBqlTable interface
    • 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
  • Delete a Code item from the project

You can open the Code Editor for a Code item by clicking the object name of the item in the page table.

Note: You can develop the customization code in the Code Editor. However, we recommend that you develop the code in Microsoft Visual Studio (as described in Integrating the Project Editor with Microsoft Visual Studio) and use the editor for either minor code correction or the insertion of ready portions of code.

To move the code from a Code item to the extension library that is bound to the customization project, use the Move to Ext. Library command on the page toolbar of the Code Editor.

For detailed information on working with Code items, see the following topics:

You can use Visual Studio to work with a Code item of a customization project that is currently published. During the publication of the project, the platform creates the <CodeItemName>.cs file with the item content in the App_RuntimeCode folder of the website. If you make changes to the code in Visual Studio, you have to update the item in the customization project. See Detecting the Project Items Modified in the File System for details.

Note: You can customize Code items for the Customer Portal as well. For details on the portal, see Customer Portal.