ManagedForm.FillCheckProcessingAtServer

Syntax:

FillCheckProcessingAtServer(<Cancel>, <CheckedAttributes>)

Parameters:

<Cancel>

Type: Boolean.
Write cancellation flag. If you set this parameter to True inside the handler procedure, then the fill check will be performed and the subsequent operations will be canceled.
Default value: False.

<CheckedAttributes>

Type: Array.
Array of paths to attributes for which the fill check will be performed. The array can be modified by deleting or adding paths to necessary attributes.

Description:

Is called by a form extension when the fill checking is required for attributes on write in the form, and also on execution of CheckFilling method.
To call the system fill checking, it is required that the form (with which the operation is executed) has the AutoFillCheck property set. In this case, at first this handler will be called, and FillCheckProcessing() handler of object module after it.
Allows the developer to implement fill checking in event handler on his own.
At the same time in this handler it is possible to completely refuse the system processing (by clearing the list of attributes to check), refuse th system check for part of attributes (by checking separate attributes in a special way and deleting them from the list), and also add other attributes to check from those for which check was not specified.
Example:
Procedure FillCheckProcessing(Cancel, CheckedAttributes)
// Check whether the "Purchaser" attribute is filled
If Not ValueIsFilled(Purchaser) Then
    // If it is not filled, then report to user about it
    Message = New UserMessage();
    Message.Text = "The Purchaser, for whom the invoice is being written, is not specified!";
    Message.Field = "Purchaser";
    Message.Message();
    // Inform the platform, that we process the attribute "Purchaser" fill check by ourselves
    CheckedAttributes.Delete(CheckedAttributes.Find("Purchaser"));
    // Information in the document is not consistent, so there is no point to continue processing
    Cancel = True;
EndIf
;
EndProcedure

Note:

For a document form, event occurs only on posting if the Posting property is set to Allow during the designing.
If a document cannot be post (the Posting property is set to Deny), then event occurs on writing.
For a business process form event is called by the form extension on business process start.

See also:

ManagedForm, method CheckFilling

    

1C:Enterprise Developer's Community