To Override a Data View Delegate
You can modify the data view delegate—that is, the method that is invoked when the records are retrieved through the data view. To do this, perform the following actions:
- Create the graph extension, as described in To Start the Customization of a Graph, if required.
- In the Code Editor, click View Source to view the code of the base
graph in the Source Code browser.Note:In an instance of MYOB Acumatica, a repository with the original C# source code of the application is kept in the \App_Data\CodeRepository folder of the website.
- In the browser, select and copy the data view declaration and the data view
delegate.Note:The override data view delegate must have exactly the same signature—the return value, the name of the method, and any method parameters—as the base data view delegate.
- In the Code Editor, paste the code in the graph extension.Note:When you declare or alter a data view delegate within a graph extension, the new delegate is attached to the corresponding data view. To query a data view declared within the base graph or a lower-level extension from the data view delegate, you should redeclare the data view within the graph extension. You do not need to redeclare a generic PXSelect<Table> data member in the graph extension when it will not be used from the data view delegate. For details, see Graph Extensions.
- In the graph extension, rewrite the data view delegate code as you need to.
- Click Save in the Code Editor to save your changes.