I used the code that i found here for access to the viewfinder. How can i fix this problem, is it due to my session config?
It is in VB.net and im using Accpac 6.0A. And I'm getting this error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
heres the code:
Dim fnd As AccpacFinder.ViewFinder
Dim mySearchArray() As Object = {1, 2, 3}
Dim myDisplayArray() As Object = {1, 2, 3}
Dim myReturnArray() As Object = {1, 2}
'Me.Cursor = Cursors.WaitCursor
fnd = New AccpacFinder.ViewFinder
fnd.Session = session
fnd.ViewID = "OE0520"
fnd.ViewOrder = 0
'fnd.DisplayName = session.CompanyName
fnd.SearchFieldIDs = mySearchArray
fnd.DisplayFieldIDs = myDisplayArray
fnd.ReturnFieldIDs = myReturnArray
fnd.Filter = ""
fnd.Finder() 'this line throws the error
If Not IsNothing(fnd.ReturnFieldValues) Then
lblDesc.Text = Trim(fnd.ReturnFieldValues(0))
End If
fnd = Nothing
It is in VB.net and im using Accpac 6.0A. And I'm getting this error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
heres the code:
Dim fnd As AccpacFinder.ViewFinder
Dim mySearchArray() As Object = {1, 2, 3}
Dim myDisplayArray() As Object = {1, 2, 3}
Dim myReturnArray() As Object = {1, 2}
'Me.Cursor = Cursors.WaitCursor
fnd = New AccpacFinder.ViewFinder
fnd.Session = session
fnd.ViewID = "OE0520"
fnd.ViewOrder = 0
'fnd.DisplayName = session.CompanyName
fnd.SearchFieldIDs = mySearchArray
fnd.DisplayFieldIDs = myDisplayArray
fnd.ReturnFieldIDs = myReturnArray
fnd.Filter = ""
fnd.Finder() 'this line throws the error
If Not IsNothing(fnd.ReturnFieldValues) Then
lblDesc.Text = Trim(fnd.ReturnFieldValues(0))
End If
fnd = Nothing