Reputation: 2271
I have a standard Acumatica screen with a Form and a Grid. Is it possible to overwrite the Add Button of a grid, so that I can carry out a custom action rather than using the standard Add.
Upvotes: 2
Views: 1346
Reputation: 7706
One of the ways is to hide the Standard Add New as I have described in the answer hide-add-button-from-grid and create your own.
Now you should create PXAction in your Graph with it's corresponding method like this:
public PXAction<SOOrder> CustomAddNew;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Add New")]
protected void customAddNew()
{
//your code here
}
After this you should go to the page and do the following:
As a result you will get the following :
Where the '+' is your PXAction
Upvotes: 4