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).
Please update 1C:Enterprise platform to the latest version: 8.2.17.157 is the latest version for today. To understand the problem it should be reproduced, if it will repeat again, try to get enough information from your client to reproduce this error.
Looks like it tries to pass Query object to client. Different versions of 1c have a slightly different behavior how to handle function declaration without explicitly declare &AtServer or &AtClient. I have also noticed some problems without specifying where the function should run.
Pages:1
Users browsing this topic (guests: 1, registered: 0, hidden: 0)