DocumentObject.<Document name>.Write

Syntax:

Write(<WriteMode>, <PostingMode>)

Parameters:

<WriteMode> (optional)

Type: DocumentWriteMode.
Allows you to select one of the possible write modes.
Default value: Write.

<PostingMode> (optional)

Type: DocumentPostingMode.
Allows you to select one of the possible posting modes.
Default value: Regular.

Description:

Writes document to database.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

Checks number uniqueness, if necessary, for documents with unique number support on write.

Example:

Try
    NewDocum.Write(DocumentWriteMode.Posting);
Except
    DoMessageBox("Document needs reposting.");
EndTry;

See also:

DocumentObject, event BeforeWrite
DocumentObject, event OnWrite

    

1C:Enterprise Developer's Community