We just upgraded a custom iMIS 10.6 iBO application to use the iMIS 15 iBOs, and started getting the following internal IBO error:
„Unknown error. Description: Subscript out of range” error number 1000
The error is thrown when we try to filter contact data. Here is the code causing the problem:
Private _securityAdmin As iboUserSecurity.CUser
Private _contactManagementAdmin As iboContactManagement.CContactsBOAdmin
Private _contactAdapter As iboContactManagement.CContacts
Public Function GetCompanyContactsFromIMIS(ByVal RetreiveAddresses As Boolean, ByVal RetreiveNotes As Boolean) As List(Of IMISContact)
Me._contactAdapter = Me._contactManagementAdmin.NewContacts(Me._securityAdmin)
Me._contactAdapter.ContactFilter.Operator = iboTranslate.EfilOperator.efilOr
For Each MemberType As String In RetreiveMemberTypes(True)
Me._contactAdapter.ContactFilter.AddFilter(iboTranslate.ZiboContactManagement_CContact.MemberType, MemberType, iboTranslate.EfilComparison.efilEqual)
Next
Return ExtractContacts(Me._contactAdapter, RetreiveAddresses, RetreiveNotes)
End Function
Friend Shared Function ExtractContacts(ByVal ContactAdapter As iboContactManagement.CContacts, ByVal RetreiveAddresses As Boolean, ByVal RetreiveNotes As Boolean) As List(Of IMISContact)
Dim ReturnList As New System.Collections.Generic.List(Of IMISContact)
Try
IBOErrorWrapper.AuditErrors(ContactAdapter) 'This method converts the IBO errors to exceptions
ContactAdapter.GetContacts(True, 0)
IBOErrorWrapper.AuditErrors(ContactAdapter) 'This is where the error shows up
Catch ex As IBOException
Throw New SoapException(ex.Message, New XmlQualifiedName("ExtractContacts"))
End Try
If ContactAdapter.Count > 0 Then
For cur As Integer = 1 To ContactAdapter.Count
Dim x As iboContactManagement.CContact = ContactAdapter.GetContact(cur)
If RetreiveAddresses Then x.GetAddresses()
If RetreiveNotes Then x.GetNotes()
ReturnList.Add(New IMISContact(x))
Next
End If
Return ReturnList
End Function
Most of our filter methods use the same syntax, and all of them generate the error described above. This code was previously fully functional using 10.6 IBO. The SQL trace showed, that the ContactAdapter.GetContacts(True, 0) does not run any sql script on the server. We are using Visual Basic .Net 2.0 for development.
You will need to contact
You will need to contact either your AiSP, or ASI Tech Support, to see if there is a supported fix/workaround, or to submit the issue as an SMR if not.
Thanks!