10-26-2017 3:53 PM - edited 02-04-2024 1:02 AM
Hi,
Currently I’m trying to figure out how to read values in the Address Component from the SO form with the SDK. Below is a screenshot giving you a better idea the values I want to read. The reason for this, when a user click on a button to create SO to PO, I want to copy the values from Address Component from SO and send these values to an PO with the SDK. Can you advise how to read the Address Component for the SO in VB?
Regards,
William
See below, I got from SDK Help
// Get Invoice document
SAPbobsCOM.Documents _mDoc;
AddressExtension m_AddrExtension;
m_Doc = (SAPbobsCOM.Documents)m_Company.GetBusinessObject(BoObjectTypes.oInvoices);
m_Doc.GetByKey(4);
// Get the address sub object from the document object
m_AddrExtension = (AddressExtension)m_Doc.AddressExtension;
// Set bill to address properties
m_AddrExtension.BillToBlock = "BillToBlockU";
m_AddrExtension.BillToBuilding = "BillToBuildingU";
m_AddrExtension.BillToCity = "BillToCityU";
m_AddrExtension.BillToCountry = "BCU";
m_AddrExtension.BillToCounty = "BUt";
m_AddrExtension.BillToState = "BSU";
m_AddrExtension.BillToStreet = "BillToStreetU";
m_AddrExtension.BillToStreetNo = "BillToStreetNoU";
m_AddrExtension.BillToZipCode = "BillToZipCodeU";
m_AddrExtension.BillToAddressType = "BillToAddressTypeU";
// Set ship to address properties
m_AddrExtension.ShipToBlock = "ShipToBlockU";
m_AddrExtension.ShipToBuilding = "ShipToBuildingU";
m_AddrExtension.ShipToCity = "ShipToCityU";
m_AddrExtension.ShipToCountry = "SCU";
m_AddrExtension.ShipToCounty = "SUt";
m_AddrExtension.ShipToState = "SUt";
m_AddrExtension.ShipToStreet = "ShipToStreetU";
m_AddrExtension.ShipToStreetNo = "ShipToStreetNoU";
m_AddrExtension.ShipToZipCode = "ShipToZipCodeU";
// Update the document
m_Doc.Update();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danilo,
Thanks for the solution. I was able to use your code as a guide and workout the conversion in VB.
Regards,
William
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.