Sales order SelectedHistoryNo and Property Changed  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Sales order SelectedHistoryNo and Property Changed

Postby SBarnes » Thu Oct 06, 2016 4:08 pm

Hi All,

I have been trying to detect when the choice of sales history is changed in the sales order screen from the snapshot drop down eventually, I have had to eventually add an event handler to HistoryUltraComboEditor for selection changed to get it to work.

I had previously tried tracking property change on the sale order of the form and looking for the property of "SelectedHistoryNo" changing only to discover that the sales order does not call NotifyPropertyChanged for this particular property, is there a reason why this is the case as given it is explicitly doing it I don't believe it's a bug?

Thanks.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Sales order SelectedHistoryNo and Property Changed

Postby Mike.Sheen » Sat Nov 12, 2016 4:58 pm

In the NotifyPropertyChanged method of the sales order business logic we explicitly filter out changes to the SelectedHistoryNo field.

Code: Select all
Public Overrides Sub NotifyPropertyChanged(ByVal propertyName As String)
   If propertyName <> "SelectedHistoryNo" AndAlso _isClearing = False Then ' Added check for _isClearing = false for bug #10070
      MyBase.NotifyPropertyChanged(propertyName)
   End If
End Sub


But, in the setter of SelectedHistoryNo we do raise a dedicated event for the SelectedHistoryNo changing: SalesOrderSelectedHistoryNoChanged

Hook into that instead.

I don't know why we filter out the NotifyPropertyChanged for changes to SelectedHistoryNo - probably to allow some efficiency in when the form decides to redisplay the lines.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Sales order SelectedHistoryNo and Property Changed  Topic is solved

Postby SBarnes » Sat Nov 12, 2016 5:19 pm

Hi Mike,

Thanks for the reply, I had gotten around this by hooking onto the events of the combo box where you select the current history.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest