DocumentObject.<Document name>.FillCheckProcessing


FillCheckProcessing(<Cancel>, <CheckedAttributes>)



Type: Boolean.
If this parameter is set to True in the body of the handler procedure, the work will not continue after performing the fill check.
Default value: False.


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.


Is called by a form extension when the fill checking is required for attributes on form write or when posting a document in form, and also on execution of CheckFilling method.
If the Posting property is set to Allow for a document during development, then this event occurs only on post.
If the document can not be posted (Deny is set), then the event is called on write.
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.
Procedure FillCheckProcessing(Cancel, CheckedAttributes)
// Check whether the "Purchaser" attribute is filled
Purchaser = CheckedAttributes.Find("Purchaser");
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";
    // Inform the platform, that we processed the attribute "Purchaser" fill check by ourselves
    // Information in the document is not consistent, so there is no point to continue processing
    Cancel = True;
// Inform the platform, that we processed the attribute "Good" fill check by ourselves in the Goods tabular section
// Travers lines and check the attributes filling
For IndexOf = 0 to Goods.Count()-Do
    SrtGood = Goods.Get(IndexOf);
Not ValueIsFilled(SrtGood.Good) Then
        Message = New UserMessage();
        Message.Text = "In line " + IndexOf + " the value of good is not filled";
        Message.Field = "Goods[" + IndexOf + "].Good";
        Cancel = True;

See also:

MetadataObject: Document, property Posting


1C:Enterprise Developer's Community