Showing results for 
Search instead for 
Did you mean: 

How to add a new Business partner.

Former Member
0 Kudos

Hi All,

Below is my coding for adding a new cardcode,cardname(add BP) in business partners...but in runtime i get a error like "Invalid Document Object" is my coding for adding a NEW Business partner.can u help me to solve this problem..

<WebMethod()> Public Function QueryBP(ByVal SessionID As String, ByVal CardCode As String,ByVal CardName As String) As Xml.XmlDocument
        Dim DISnode As SBODI_Server.Node
        Dim strSOAPans, strSOAPcmd As String
        Dim xmlDoc As Xml.XmlDocument
        xmlDoc = New Xml.XmlDocument
        DISnode = New SBODI_Server.Node
        strSOAPcmd = "<?xml version=""1.0"" encoding=""UTF-16""?>" & _
        "<env:Envelope xmlns:env="""">" & _
        "<env:Header>" & _
        "<SessionID>" & CStr(SessionID) & "</SessionID>" & _
        "</env:Header><env:Body><dis:AddObject xmlns:dis="""">" & _
        "<Object>BusinessPartners</Object>" & _
        "<CardCode>" & CardCode & "</CardCode>" & _
        "<CardName>" & CardName & "</CardName>" & _
        strSOAPans = DISnode.Interact(strSOAPcmd)
        Return (RemoveEnv(xmlDoc))
    End Function

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


you should use


we have samples by default under

C:\Program Files\SAP\SAP Business One SDK\Samples\DI Server\VB.NET\DIServerBP\

Best Regards,

Xiaodan AN

Answers (0)