IDocument Methods |
The IDocument type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | CancelChanges | Undo any changes made since the object was loaded.
If you made changes to the model that you don’t want to be saved to the database, call the CancelChanges method |
![]() ![]() | ChangeIdentity | Loads a different record into the object. Causes changes to the existing object to be saved first.
Saves the changes made to the document model to the database. The last thing you do to an object if you want the changes you made to be saved. The ChangeIdentity method calls the save method first |
![]() | Clone | Clone this document |
![]() ![]() | Delete | Delete the object from the database. May throw an error if you are not allowed to delete the object.
Deletes the specified document model from the database. When you programmatically delete a document model, the physical file is not deleted from the document archive |
![]() ![]() | GenerateDocumentFile | GenerateDocumentFile - copies the template and substitutes the given contact/person/project values. Returns false on failure.
Creates a document and does the tag substitutions (template variables) according to the properties set on the document object. Will generate a filename based on the contact and template type if the target path is blank. Will use the correct file in the template directory in SO_ARC if the templateSource is blank. Copies the template and substitutes the given contact/person/project values |
![]() ![]() | GetFileCopy | make a copy of the file and return the path
Make a copy of a file, and return the path to it. Used by document plugin, gives you the possibility to force e.g. Notes to put the document on a disk where other may access it |
![]() | IsSuggestedItem | Is this document used as a suggested document? |
![]() ![]() | ReplaceFile | ReplaceFile - archive the file provided and update record if necessary, or replace contents of existing file with same name, or
There are three different scenarios:
|
![]() ![]() | Save | Persist the object to the database. May throw an error if you are not allowed to save changes to the object.
Saves the changes you made to the document model to the database, does not return the new data from the database |
![]() ![]() | SetDefaults | Populate the object with default values, such as setting the owner to the current user.
Uses the UserPreferences table to set the predefined default settings for a document. The SetDefaults method is only available for current objects in this version of SuperOfficeDB Type Library |
![]() | SuggestedItemId | Get the suggested item id |