Hi,
i have added a Custom UDF for SOLine on Sales order screen, everything works fine, but when i apply a filter to that feild it doesnot work, any help will be greatly appriciated
thank you
Hi,
i have added a Custom UDF for SOLine on Sales order screen, everything works fine, but when i apply a filter to that feild it doesnot work, any help will be greatly appriciated
thank you
Best answer by darylbowman
First off, the code you have is running BQL queries in RowSelected, which is not best practice. In the future, you should use FieldSelecting to populate unbound fields, but we're getting away from that.
Since your calculations depend on both CuryLineAmt and OrderQty, you'll want to rerun the calculation any time either of those fields changes. To accomplish this, you can put the calculation in it's own method and call it from FieldUpdated for both fields.
The code you have is already setting the value in the field, so I think that should do it. Just move it from RowSelecting into a method instead and call it whenever you need it updated.
You'll need to change the DAC extension definition to a PXDBDecimal and add the field to the SOLine table. I'm assuming you know how to do this.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.