Good afternoon.
Our client gets this error when he tries to select an employee in the form field (attribute type is Catalog.Employees).
There is one choice parameter (Filter.DeletionMark=False) added to the form item.
There is also custom ChoiceDataGetProcessing event handler in the catalog Employees.
Platform version is 8.2.15.301
The source code:
| Code |
|---|
Procedure ChoiceDataGetProcessing(ChoiceData, Parameters, StandardProcessing)
StandardProcessing = False;
ChoiceData = New ValueList;
Query = New Query;
Query.Text =
"SELECT TOP 50
| Employees.Ref,
| Employees.Description + "" ("" + Employees.Code + "")"" AS Presentation
|FROM
| Catalog.Employees AS Employees
|WHERE
| (Employees.Description LIKE &Param
| OR Employees.Code LIKE &Param)";
Query.SetParameter("Param", "%" + Parameters.SearchString + "%");
CommonUse.AddFiltersToCustomChoiceDataGetProcessing(Parameters, Query, "Employees");
Query.Text = Query.Text + "
|
|ORDER BY
| Employees.Code";
Result = Query.Execute();
SelectionDetailRecords = Result.Choose();
While SelectionDetailRecords.Next() Do
ChoiceData.Add(SelectionDetailRecords.Ref, SelectionDetailRecords.Presentation);
EndDo;
EndProcedure
// This procedure is located in common server module
Procedure AddFiltersToCustomChoiceDataGetProcessing(Parameters, Query, CatalogName) Export
If TypeOf(Parameters) = Type("Structure") Then
If Parameters.Property("Filter") Then
For Each AttributeName In Metadata.Catalogs[CatalogName].Attributes Do
If Parameters.Filter.Property(AttributeName.Name) Then
Query.Text = Query.Text + " AND " + CatalogName + "." + AttributeName.Name
+ " = &" + AttributeName.Name;
Query.SetParameter(AttributeName.Name, Parameters.Filter[AttributeName.Name]);
EndIf;
EndDo;
For Each AttributeName In Metadata.Catalogs[CatalogName].StandardAttributes Do
If Parameters.Filter.Property(AttributeName.Name) Then
Query.Text = Query.Text + " AND " + CatalogName + "." + AttributeName.Name
+ " = &" + AttributeName.Name;
Query.SetParameter(AttributeName.Name, Parameters.Filter[AttributeName.Name]);
EndIf;
EndDo;
EndIf;
EndIf;
EndProcedure
|
This error never occured on my computer, and on computers of my partners.
This morning I tried to simulate it at client's computer but the system worked fine. (Client rebooted the PC before I entered the db).
Thank you for your help.
Roman.

