Hello,
In Sales order form, I would need to override the “Insert row” standard action but I'm struggling to find the way to do this.
Does anyone have a suggestion about this ?
Thanks.
Hello,
In Sales order form, I would need to override the “Insert row” standard action but I'm struggling to find the way to do this.
Does anyone have a suggestion about this ?
Thanks.
Hi
What is it that you’re needing to do? If you can give us some more details around the functionality we might be able to make a more targeted suggestion.
As indicated above please work with the above events, which will help you get the solution.
Please Let me if you have any queries on this.
Thanks to both of you for your quick replies. Sorry, I wasn't clear enougth indeed,
When we click the "Insert row" button in the grid of Sales orders lines (action "AddNew" of SOOrderEntry), this adds basically a new line in the grid.One of our customers is faced to a performance issue when running this action and we'd like to measure precisely the time spent to perform.The idea is to create an override of the "AddNew" action. This could lead to something looking like the logic below :
PXOverride]
public delegate void CustomAddNewDelegate(someSuitableArguments);
/PXButton]
bPXUIField]
public void AddNew(someSuitableArguments, CustomAddNewDelegate BaseMethod)
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
BaseMethod(someSuitableArguments);
stopwatch.Stop();
PXTrace.WriteInformation($"Process lasted {stopwatch.ElapsedMilliseconds} ms.");
}
I don't see where the "AddNew" action is defined and I don't know which signature is expected. Maybe this is simply not the right way to proceed.
Hi
Hello,
Sorry Chris Hackett for my late reply and thanks to Naveen Boga for his suggestion. I suspected that, as explained in the post above, overriding the AddNew button was very likely not a good practise so, I had given up this approach. We have found an other way to get our measurement. However, I will keep in mind to use events in such cases.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.