Skip to Content
0
Nov 04, 2005 at 03:43 PM

error updating business partners

32 Views

Hi,

I have a routine to add/updat business partners, but when I update them I get the message "Cannot add multi bill.to address to non supplier BP", but I am doning nothing with the addresses.

If bp.GetByKey(rs.Fields.Item(0).Value) Then

bp.CardType = SAPbobsCOM.BoCardTypes.cLid

bp.CardName = compname

bp.Phone1 = telnr

bp.ContactPerson = contactp

bp.Website = website

bp.UserFields.Fields.Item("U_HUIDPAKK").Value = huidigpak

If bp.UserFields.Fields.Item("U_BELVERSL").Value.length > 0 Then

bp.UserFields.Fields.Item("U_BELVERSL").Value += contact

Else

bp.UserFields.Fields.Item("U_BELVERSL").Value = contact

End If

bp.UserFields.Fields.Item("U_MAILDATM").Value = caldate

Dim rc As Integer = bp.Update

If rc <> 0 Then

SBO_Application.MessageBox("UPDATE: " + oCmp.GetLastErrorDescription + vbCrLf + bp.CardCode)

End If

Else

SBO_Application.MessageBox(rs.Fields.Item(0).Value + " niet gevonden")

End If

End If