Skip to Content
0
Former Member
May 21, 2012 at 02:34 PM

Internal Error 6001 when a CFL is in a Matrix

123 Views

Hey guys! I've struggling with this error for over a week and I don't know what else to do 😔

I created an UDO and edited the default form on screen painter (removed some fields and repositioned others). In one of the matrixes I put a CFL (for business partner) in one column, with the ChooseFromListAutoFill set on true. When I choose a CardCode it should also fill another column with the CardName. But when I do that I get an Internal Error (6001).

I tried putting breakpoints in the code, it passes over my code just fine, fills the column with the name then, after it, throws that exception before or during the ChooseFromListAutoFill, I don't know exactly when because it's after my code, so I can't debug.

Here is my code:

IChooseFromListEvent oCFLEvento = (IChooseFromListEvent)pval;

Form oForm = B1AppDomain.Application.Forms.Item(formuid);

if (oCFLEvento.SelectedObjects != null)

{

DataTable oDataTable = oCFLEvento.SelectedObjects;

string valCodigo = null;

string valNome = null;

switch (pval.ItemUID)

{

case "mtxComisso":

if (oCFLEvento.ColUID == "C_1_3")

{

valCodigo = Convert.ToString(oDataTable.GetValue(0, 0));

valNome = Convert.ToString(oDataTable.GetValue(1, 0));

Matrix oMatrix = oForm.Items.Item("mtxComisso").Specific;

Columns oCols = oMatrix.Columns;

Column oCol = oCols.Item("C_1_4");

Cell oCell = oCol.Cells.Item(oCFLEvento.Row);

EditText oEditText = oCol.Cells.Item(oCFLEvento.Row).Specific;

oEditText.Value = valNome;

}

break;

//cases for other CFLs in the form, no need to copy them here

default:

break;

}

}

Some extra info:

- I didn't define DataSources in my code, since it is an auto generated form for an UDO, other than this CFL problem it saves the data normally, as it's supposed to.

- All the data types are correct, I checked it over and over.

- The CFL works fine when it's in an EditText, this problem occurs only when it's in a Matrix.

- It happens in all CFLs that are within a Matrix.

- I'm using 8.82 PL06.