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.
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:
- To Create a Custom Business Logic Controller
- To Create a Custom Data Access Class
- To Customize an Existing Business Logic Controller
- To Customize an Existing Data Access Class
- To Add Custom Code to a Project
- To Add a Customization Plug-In to a Project
- To Delete a Code Item From a Project
- To Move a Code Item to the Extension Library
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.