on 2025 Mar 19 8:13 AM
Hi
I have below code to connect to a Company. Now want to create a button in Purchase Order form as Send Email.
oCompany = new SAPbobsCOM.Company();
oCompany.Server = "NDB@10.0.1.28:30015";
oCompany.DbServerType = BoDataServerTypes.dst_HANADB;
oCompany.CompanyDB = "LIVE_Database";
oCompany.UserName = "manager";
oCompany.Password = "123";
oCompany.language = BoSuppLangs.ln_English;
oCompany.UseTrusted = true;
int connectionResult = oCompany.Connect();
if (connectionResult != 0)
{
throw new Exception("Error connecting to SAP Business One: " + oCompany.GetLastErrorDescription());
}
Thanks
Request clarification before answering.
Hi ramco1917 ,
If you have installed SAP Business One SDK, you can refer to the sample code in the following location:
C:\Program Files (x86)\sap\SAP Business One SDK\Samples\COM UI\CSharp\11.SystemFormManipulation
This sample demonstrates how to customize a System Form.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ramco1917 ,
oApplication is the object to connect to SAP Business One application (For making UI API connection).
In order to create a Button on System Form (Purchase Order in this case), you first need to make a UI API connection as mentioned in the sample code which I shared in my previous answer.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.