on 2025 Feb 06 8:33 AM
Hi
I have below code . I want to add button in Sales Order Form after Cancell Button
SAPbobsCOM.Company oCompany = new SAPbobsCOM.Company();
SAPbouiCOM.Application oApplication = new SAPbouiCOM.Application();
oCompany.Server = "10.0.1.28:30015";
oCompany.DbServerType = BoDataServerTypes.dst_HANADB;
oCompany.CompanyDB = "Test_LIVE";
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 ,
Install SAP Business One SDK from SAP Business One Patch Package.
Then, you can refer to the sample project "11.SystemFormManipulation" from the following location:
C:\Program Files (x86)\sap\SAP Business One SDK\Samples\COM UI\CSharp
It will help you.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Taken from the SDK Sample
SAPbouiCOM.Button oButton = null;
oItem = oForm.Items.Add( "1", SAPbouiCOM.BoFormItemTypes.it_BUTTON );
oItem.Left = 6;
oItem.Width = 65;
oItem.Top = 51;
oItem.Height = 19;
oButton = ( ( SAPbouiCOM.Button )( oItem.Specific ) );
oButton.Caption = "Ok";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Your code is not adding the button in the form. You need to write the code to catch the event of the application corresponding to the sales order form loading and then create the button on it.
There is plenty of samples in the SDK documentation on how to do this.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.