cancel
Showing results for 
Search instead for 
Did you mean: 

Error-Item - The item is not a user-defined item [66000-8]

Former Member
0 Kudos

Error occur during set value on text box field from CFL .

if (oCFLEvent.BeforeAction == false)

                {

                    SAPbouiCOM.DataTable oDataTable1 = oCFLEvent.SelectedObjects;

                    try

                    {

                       

                        if (pVal.ItemUID == "edtxt2" && oCFL.UniqueID == "CFL_2")

                        {

                           

                            string code = Convert.ToString(oDataTable1.GetValue("CardCode", 0));

                            oDBDataSource = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Add("OPOR");

                            oForm.Items.Item("edtxt2").Click(SAPbouiCOM.BoCellClickType.ct_Regular);

                          

                         

                           oDBDataSource.SetValue("U_Vcode", 0, code);//Error Occur

                           

}

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mohammad,

Are you trying this on Purchase Order Form or on User Defined Form. ?

And can you please explain your scenario ?

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Customization on Purchase Order Form add Text box and set card code through CFL

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mohammad,

Once you have added your EditText and CFL in that textbox successfully. Then why don't you simply try this:

// This code I used for Sales Order Form. You use it accordingly.

if (pVal.FormType == 139 && pVal.ItemUID == "Billing" && strUid == "Partners")

                                            {

                                                try

                                                {

                                                    SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oform.Items.Item("Billing").Specific;

                                                    oEdit.Value = Convert.ToString(oDataTable.GetValue("CardCode", 0));

                                                }

                                                catch (Exception ex)

                                                {

                                                    Program.oMainSAPDI.ShowMessage(ex.Message, BoStatusBarMessageType.smt_None);

                                                }

                                                finally

                                                {

                                                    SAPbouiCOM.EditText oEditName = (SAPbouiCOM.EditText)oform.Items.Item("BillingN").Specific;

                                                    oEditName.Value = Convert.ToString(oDataTable.GetValue("CardName", 0));

                                                }

                                            }

Hope it helps.

Thanks & Regards

Ankit Chauhan

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mohammad,

Once the problem is solved, please close the thread by marking correct answer.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

sir

Are not possible to use SetValue for system table.

please reply

thanks and regards

Mohammad Asharaf

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mohammad,

As far as I know about SAP B1 SDK,

1. You cannot access a DBDataSources used by a system form.

2. You can add a DBDataSources only if the database table does not exist already in the system form's DataSources collection.

Hope it is helpful.

Thanks & Regards

Ankit Chauhan

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mohammad,

One more thing about SetValue Method that

The method does not affect data in the SAP Business One database table to which the data source is bounded.

Hope it is pretty clear now.

Thanks & Regards

Ankit Chauhan

Answers (0)