cancel
Showing results for 
Search instead for 
Did you mean: 

Crud Best Practise

0 Kudos

I am developing an add on and I need to know what are the best practises to update a Order Object I need to show and update the order lines and also is their a way to get the business one grid to have inline editing same as Sales Order Lines Allow.

So far I am using the following.

 private void Button0_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent)
{
            BubbleEvent = true;
            oform = (SAPbouiCOM.Form)Application.SBO_Application.Forms.ActiveForm;

            Application.SBO_Application.MessageBox("Hello world");

            dt = oform.DataSources.DataTables.Add("dt");
            dt.ExecuteQuery("SELECT * from OCRD");
            grid0.DataTable = dt;
}


0 Kudos

Hello David,

By using UI API you can create your own form linked to a Business Object like orders, delivery, invoice and many more.

Please note that SAP B1 data is not supposed to be updated by SQL statements. My understanding is that you can select data but do not update/insert/delete/alter tables using SQL or SAP warranty voids.

I suggest taking a look at SAP Business One Studio that allows you to design your form and later use the design in Visual Studio .NET to write the code.

SB1 has two sets of API.

1.-UI API allows creating applications that run seamlessly into Business One and access objects. UI Forms allows creating, modifying, deleting business objects and one at a time.

2.-DI API allows you to create/alter SAP B1 business objects. You can bulk create invoices for instance.

The process of learning SB1 programming is a bit convoluted. My suggestion is to take a look at samples and documentation in the SDK included with the SB1 installation.

Also, note that there is a licencing restrictions when using DI API.

Regards.

Héctor.

Accepted Solutions (0)

Answers (0)