Skip to Content

SBO Addon throws a missing BP Code during "1" click (update)

Dear Community,

I have been meddling with a weird error on one of my personal addons. The problem is, when I hit update button i get the following error

Below you can see the code of the Update Button;

private void Button0_PressedBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent)


BubbleEvent = true;

if (Application.SBO_Application.Forms.ActiveForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE)


int cnt = Grid4.Rows.Count;

int rowIndex, ok;

string CallID;

int count = Grid4.DataTable.Rows.Count - 1;

ProgressBar0 = Application.SBO_Application.StatusBar.CreateProgressBar("Checking Completed Service Calls", cnt - 1, false);

ProgressBar0.Value = 0;

for (int i = 0; i < cnt; i++)




showRow = int.Parse(Grid4.DataTable.Columns.Item("CallID").Cells.Item(i).Value.ToString());

ProgressBar0.Value = i;

ProgressBar0.Text = i + "/" + cnt + " - " + showRow;


catch { }

rowIndex = Grid4.GetDataTableRowIndex(i);

if (rowIndex != -1)




CallID = Grid4.DataTable.GetValue("CallID", rowIndex).ToString();

oSCs = ((SAPbobsCOM.ServiceCalls)(Globals.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oServiceCalls)));


oSCs.UserFields.Fields.Item("U_Completed").Value = Grid4.DataTable.GetValue("Completed", rowIndex).ToString();

oSCs.UserFields.Fields.Item("U_SalesOrder").Value = Grid4.DataTable.GetValue("Sales Order", rowIndex).ToString();

ok = oSCs.Update();

if (ok != 0)


Application.SBO_Application.MessageBox(Globals.oCompany.GetLastErrorDescription().ToString(), 1, "Ok", "", "");



catch { ProgressBar0.Stop(); }






What i noticed though, is that this is caused whenever i use CFL (Choose From List). Here is the CFL Feature i use

The Properties of the EditText Field are:

The CFL datasource properties are:

Any Ideas why this happens?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Aug 23, 2016 at 12:42 AM

    Hi Varnavas,

    Did you assign your form object type as '2'?

    Can you post the screen shot of your form properties



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2016 at 03:58 PM

    After you run oSCs.GetByKey(int.Parse(CallID)); try to get the oSCs.CustomerCode value to see what you have there.

    Do you have any UDO linked to your form?"

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2016 at 06:41 PM

    Hello Varnavas,

    Have you checked the below discussion? It seems another member managed to resolve the same issue you are having.

    How to add a user defined field to Business Par... | SCN

    Kind Regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • It appears to be irrelevant with the current subject. No other form is active during the editing of the SCs. Before I add the CFL feature, i wouldn't get any errors. I would like to keep the CFL feature though. By the way, the code executes fine most of the times while sometimes it will not do the update of the SCs. Error always appears.

  • Posted on Aug 23, 2016 at 05:31 AM

    another thing, when i have a customer code in the CFL edit text and try to update, i receive the following error.

    and the update does not occur

    Screenshot_7.png (41.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.