Skip to content

Server-side export form method (ServerSideExportFormMethod)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL Blocker Yes 5 error
unpredictable
suspicious

Description

In a form module, you can declare export methods that are available in the client context (usually, these are form notification event handlers). For export methods of the form, only the compilation directive AtClient can be specified, since for the rest there is no practical sense: accessing form methods from outside is available only after calling the method GetForm, which is available only on the client.

Specifying a different compilation directive for the export method or its absence is considered an error.

In some versions of the 1C:Enterprise platform, there was an error that allowed using export server-side methods of forms, but it is unacceptable to design a solution using undocumented platform capabilities.

Examples

Incorrect use of export methods on a form

Procedure One() Export
  // procedure without directive is available on the server
EndProcedure

&AtServerNoContext
Procedure AtServerNoContext() Export
EndProcedure

&AtServer
Procedure AtServer() Export
EndProcedure

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:ServerSideExportFormMethod-off
// BSLLS:ServerSideExportFormMethod-on

Parameter for config

"ServerSideExportFormMethod": false