DocumentObject.<Document name>

Properties:

<Attribute name>
<Common attribute name>
<Tabular section name>
AdditionalProperties
BelongingToSequences
DataExchange
DataVersion
Date
DeletionMark
Number
Posted
Ref
RegisterRecords
ThisObject

Methods:

CheckFilling
Copy
Delete
Fill
GetForm
GetNewObjectRef
GetTemplate
IsLocked
IsNew
Lock
Metadata
Modified
PointInTime
Read
SetDeletionMark
SetNewNumber
SetNewObjectRef
SetTime
Unlock
Write

Events:

BeforeDelete
BeforeWrite
FillCheckProcessing
Filling
OnCopy
OnSetNewNumber
OnWrite
Posting
UndoPosting

Description:

Used for reading, modifying, adding and deleting a document.
Important: All events of this object have predefined handler procedures assigned to them. The handlers' names correspond to event names. Procedures must be contained in the document module.

Availability:

Server, thick client, external connection, Mobile application (server).
The given object may be serialized to/from XML. The given object may be serialized to/from XDTO. The XDTO type correspoding to this object is defined in {http://v8.1c.ru/8.1/data/enterprise/current-config} namespace. XDTO type name: DocumentObject..

Example:

NewDocum = Documents.ArticlesMoving.CreateDocument();
NewDocum.Date = InputFieldDate;
NewDocum.SetTime();
NewDocum.SetNewNumber();
// Generate tabular section
For H=To Do
    NewRow = NewDocum.Articles.Add();
    NewRow.Nomenclature = DataRow.Nomenclature;
    // Generate other attributes of the tabular section
    ...
    //
EndDo;
NewDocum.Write();
DocumentsList.Add(NewDocum.Ref);

See also:

DocumentRef
DocumentSelection

    

1C:Enterprise Developer's Community