on 11-16-2015 4:00 PM
Hi,
I'm trying to update a BusinessPartner through UpdateObject XML code but I get an error... I got through some other post in this forum and it seems my code is like suggested there
I can create new BusinessPartners without problems (using nearly the same code with the AddObject command), but today I tried to create the code for UpdateObject and I get the following error back (I started just updating the CardName, like suggested in other posts)
here my code and the reply from DI server:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header >
<SessionID>C5A03D9D-B46C-46E3-B768-D4C9FB120074</SessionID>
</SOAP-ENV:Header>
<SOAP-ENV:Body >
<dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
<BOM >
<BO >
<AdmInfo >
<Object>oBusinessPartners</Object>
</AdmInfo>
<BusinessPartners >
<row>
<CardCode>411.2800</CardCode>
<CardName>Mario Rossi TEST UPDATE</CardName>
</row>
</BusinessPartners>
</BO>
</BOM>
</dis:UpdateObject>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Receiver</env:Value>
<env:Subcode>
<env:Value>env:0</env:Value>
</env:Subcode>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">Failed to execute command</env:Text>
</env:Reason>
<env:Detail>
<Object>2</Object>
<ObjectIndex>1</ObjectIndex>
<Command>UpdateObject</Command>
<SessionID>C5A03D9D-B46C-46E3-B768-D4C9FB120074</SessionID>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>
Hi,
I am able to update Business Partners using the below XML code. Please change it as per your need:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>E1433C21-1DE6-480B-90BB-8D21CB9BC3EE</SessionID>
</env:Header>
<env:Body>
<dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
<BOM xmlns="http://www.sap.com/SBO/DIS">
<BO>
<AdmInfo>
<Object>oBusinessPartners</Object>
</AdmInfo>
<QueryParams>
<CardCode>C0008</CardCode>
</QueryParams>
<BusinessPartners>
<row>
<CardCode>C0008</CardCode>
<CardName>TESTBP</CardName>
<GroupCode>100</GroupCode>
<Phone1>961</Phone1>
<FederalTaxID>9999999</FederalTaxID>
<EmailAddress></EmailAddress>
<ShipToDefault></ShipToDefault>
<BilltoDefault></BilltoDefault>
</row>
</BusinessPartners>
<BPAddresses>
<row>
<AddressName></AddressName>
<Street>xxxxxxx</Street>
<ZipCode></ZipCode>
<City></City>
<County></County>
<Country></Country>
<AddressType>S</AddressType>
</row>
<row>
<AddressName></AddressName>
<Street></Street>
<ZipCode></ZipCode>
<City></City>
<County></County>
<Country></Country>
<AddressType>B</AddressType>
</row>
</BPAddresses>
</BO>
</BOM>
</dis:UpdateObject>
</env:Body>
</env:Envelope>
Kind regards,
ANKIT CHAUHAN
SAP Business One Global Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.