Page 1 of 1

Sales Order Line Changed

PostPosted: Fri Dec 12, 2014 2:28 pm
by DannyC
See attached plugin.

I want to do something on sales order line changed but am getting an error that the sub does not have a signature compatible with delegate.

Two questions:
1. How to fix the error
2. How to know the field which fired the SalesOrderLines.Changed event?

Thanks

Danny

Re: Sales Order Line Changed  Topic is solved

PostPosted: Fri Dec 12, 2014 4:21 pm
by Mike.Sheen
DannyC wrote:See attached plugin.

I want to do something on sales order line changed but am getting an error that the sub does not have a signature compatible with delegate.

Two questions:
1. How to fix the error
2. How to know the field which fired the SalesOrderLines.Changed event?

Thanks

Danny


Hi Danny,

You seem to have forgotten to attach your plugin. Despite this, I can give you some guidance:

1. The handler you have needs to have the same number of parameters and data types as the event. In the case of the Changed event of the sales order lines collection, it should be something like this:

Code: Select all
Public Sub SalesOrderLines_Changed(item As JiwaSales.SalesOrder.SalesOrderLine, e As System.ComponentModel.PropertyChangedEventArgs)


2. The e argument has a property called PropertyName - examine that - e.g.:

Code: Select all
If e.PropertyName = "DiscountedPrice" Then
   ' Do something
End If


Mike