I've been hammering away at this customization for a bit but am puzzled as to why I'm having issues. I've used otrans.update() before and have had no problems whatsoever.
Anyway, I am looking at a customization that puts a number in the field InvcHead.Number01 depending on what plant is found in the field InvcHead.Plant. I've tried several event triggers: add row, after field change, load....but none of them have worked thus far. When I use a button click as the event trigger my code works for sure and the correct number populates InvcHead.Number01. So I'm stuck on two things: 1.) A sufficient event trigger and 2.) An error when I try to use otrans.update() or otrans.refresh()
I haven't used EpiViewNotification but it sounded like the right direction to head. The error I'm getting when I try to use otrans.update() or otrans.refresh() is as follows...
"Error: BC30455 - line 97 (252) - Argument not specified for parameter 'refreshGroup' of 'Public Function Update(refreshGroup As Boolean) As Boolean'."
Here is my code:
Private Sub edvInvcHead_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvInvcHead.EpiViewNotification
If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
If (args.Row > -1) Then
Dim edvInvcHead As EpiDataView = CType(oTrans.EpiDataViews("InvcHead"), EpiDataView)
Dim Plant As String = edvInvcHead.dataView(edvInvcHead.Row)("Plant")
Dim OurSupplierCode As Decimal = edvInvcHead.dataView(edvInvcHead.Row)("Number01")
If edvInvcHead.dataView(edvInvcHead.Row)("Plant") = "HOP" then
edvInvcHead.dataView(edvInvcHead.Row)("Number01") = 127780
'otrans.update()
'otrans.refresh()
Else if edvInvcHead.dataView(edvInvcHead.Row)("Plant") = "JRZ" then
edvInvcHead.dataView(edvInvcHead.Row)("Number01") = 102795
'otrans.update()
'otrans.refresh()
Else
End if
'otrans.update()
'otrans.refresh()
End If
End If
'otrans.update()
'otrans.refresh()
End Sub
Any help would be much appreciated.
Thanks,
Drew
Anyway, I am looking at a customization that puts a number in the field InvcHead.Number01 depending on what plant is found in the field InvcHead.Plant. I've tried several event triggers: add row, after field change, load....but none of them have worked thus far. When I use a button click as the event trigger my code works for sure and the correct number populates InvcHead.Number01. So I'm stuck on two things: 1.) A sufficient event trigger and 2.) An error when I try to use otrans.update() or otrans.refresh()
I haven't used EpiViewNotification but it sounded like the right direction to head. The error I'm getting when I try to use otrans.update() or otrans.refresh() is as follows...
"Error: BC30455 - line 97 (252) - Argument not specified for parameter 'refreshGroup' of 'Public Function Update(refreshGroup As Boolean) As Boolean'."
Here is my code:
Private Sub edvInvcHead_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvInvcHead.EpiViewNotification
If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
If (args.Row > -1) Then
Dim edvInvcHead As EpiDataView = CType(oTrans.EpiDataViews("InvcHead"), EpiDataView)
Dim Plant As String = edvInvcHead.dataView(edvInvcHead.Row)("Plant")
Dim OurSupplierCode As Decimal = edvInvcHead.dataView(edvInvcHead.Row)("Number01")
If edvInvcHead.dataView(edvInvcHead.Row)("Plant") = "HOP" then
edvInvcHead.dataView(edvInvcHead.Row)("Number01") = 127780
'otrans.update()
'otrans.refresh()
Else if edvInvcHead.dataView(edvInvcHead.Row)("Plant") = "JRZ" then
edvInvcHead.dataView(edvInvcHead.Row)("Number01") = 102795
'otrans.update()
'otrans.refresh()
Else
End if
'otrans.update()
'otrans.refresh()
End If
End If
'otrans.update()
'otrans.refresh()
End Sub
Any help would be much appreciated.
Thanks,
Drew