GetForm method call (GetFormMethod)¶
| Type | Scope | Severity | Activated by default | Minutes to fix | Tags | 
|---|---|---|---|---|---|
| Error | BSL | Major | Yes | 15 | error | 
Description¶
To open forms, use the OpenForm global context method (when using the 1C: Enterprise 8.2 platform version and earlier versions, also use OpenFormModal). An alternative method, using the GetForm method, is not recommended.
Examples¶
Procedure Test()
    Doc = Documents.PlanOperation.CreateDocument();
    Form = Doc.GetForm("DocumentForm"); // here
EndProcedure
Procedure Test2()
    Form = GetForm("CommonForms.MyForm");
EndProcedure
Sources¶
Source: Development standards (RU)
Snippets¶
Diagnostic ignorance in code¶
// BSLLS:GetFormMethod-off
// BSLLS:GetFormMethod-on
Parameter for config¶
"GetFormMethod": false