Sales Order Line Changed  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Sales Order Line Changed

Postby DannyC » Fri Dec 12, 2014 2:28 pm

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
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Sales Order Line Changed  Topic is solved

Postby Mike.Sheen » Fri Dec 12, 2014 4:21 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron