Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 985 Bytes

MissedRequiredParameter.md

File metadata and controls

33 lines (23 loc) · 985 Bytes

Missed a required method parameter (MissedRequiredParameter)

Description

Required parameters must not be omitted when calling methods, otherwise the value Undefined will be passed to the parameter, which the method often cannot process. If the value Undefined is valid, then you need to

  • explicitly pass a value
  • or make the parameter optional with a default value of Undefined.

Examples

For example

Procedure ChangeFormFieldColor(Form, FiledName, Color)

Incorrect:

ChangeFormFieldColor(,"Result", StyleColors.ArthursShirtColor); // missing first parameter Form
ChangeFormFieldColor(,,); // missing all required parameters

Correct:

ChangeFormFieldColor(ThisObject, "Result", Color); // all required parameters are specified

Sources

Parameters of procedures and functions (RU)