Document Version
Access path: PublicAPI.Docflow.DocumentVersionMethods
Name | Description | |
---|---|---|
AddDocumentVersion(Document, BinaryFile) |
Add a document version
| |
AddDocumentVersion(Document, BinaryFile, DocumentVersionStatus) |
Add a document version
| |
ChangeVersionStatus |
Change the version status
| |
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
Delete |
Delete Object
| |
Filter |
Creates an assistant for working with the "Document Version" object filter
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
GenerateByCurrentVersion |
Generate document version from the file of the current version
| |
GenerateByFile |
Generate document version from the user's file
| |
GenerateByTemplateFile |
Generate document version from a template file
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Refresh |
Refresh (read over) Object from Database
| |
RenameVersionFile |
Rename the document version
| |
Save |
Save the document version to the database
|
Properties
Name | Description | |
---|---|---|
TypeUid |
Returns the unique object identifier "Document Version"
|
Remarks
Examples
Add a version of the document created here
//Get the document version status var docVersionStatus = PublicAPI.Enums.Documents.DocumentVersionStatus.Current; //add a document version var myDocumentVersion = PublicAPI.Docflow.DocumentVersion.AddDocumentVersion(myDocument, context.BinaryFile, docVersionStatus);
Add several document versions. All of them will have the "Draft" status
var docVersion = PublicAPI.Docflow.DocumentVersion.AddDocumentVersion(myDocument, context.BinaryFile1); var docVersion2 = PublicAPI.Docflow.DocumentVersion.AddDocumentVersion(myDocument, context.BinaryFile2); var docVersion3 = PublicAPI.Docflow.DocumentVersion.AddDocumentVersion(myDocument, context.BinaryFile3);
Change the document version status
//Get the document version status var versionStatus = PublicAPI.Enums.Documents.DocumentVersionStatus.Current; //Change the document version status PublicAPI.Docflow.DocumentVersion.ChangeVersionStatus(docVersion2, versionStatus);
Rename the document version
PublicAPI.Docflow.DocumentVersion.RenameVersionFile(docVersion3, "New Name for Document Version", true);
See Also