The app DEC allows to log the changes of documents as well as their creation and deletion. To log a document creating and updating, you must use for it the object of DocExt class ( script library DocExtLib ) in a code. To log a document deletion you must paste special code into the event QueryDocumentDelete of the app section Database Script. The document fields whose changes should be logged are defined by DocExt\Doc config named as the form of changed document.

App using

The app DEC contains the design elements to deploy the documents update log. You can use the app DEC itself as the log but it's more convenient to use instead of it a stand-alone app with some its design elements. You also can use the same app for the processing of delayed documents update.

You should describe in a Project config the app chosen as the documents update log. It can be a config where also are described the apps with documents whose updates should be logged, or can be a separate config with the log which the links from other Project configs have been typed to. It's defined by how many logs you want to use. By default the app's name in a Project config by which you will address to log is defined by the variable DE_LOG_APP of the script library DocExtLib with initial value "Log". You can overwrite the default app's name using the tag LOG_APP in a DocExt\Doc config.

Design elements

In the list are specified the design elements in the app DEC that are required for deploying the documents' update log. If you have decided to use stand-alone app as the log, you should create a new app and paste the design elements into it.

The view "Documents Update Log" - for viewing the documents updates.
The form "Documents Update Log - Entry" - displays the update details of a document.

Log entry

A log entry in log's app is represented by the document which can be shown through the form "Document Update Log". Such document contains the fields about a change of a document itself as well as about all updates in other documents related to the change:

DocFile - the file name of the app with the changed document;
DocServer - the server name of the app with the changed document;
DocUNID - the UNID of the changed document;
Message - text list about the document change. The first item in the list contains info about the user who did the changes, and about the changed document. And each next item describes the change of a document field;
Targets - Rich Text about the updates in all related documents that were caused by the change. Besides text the field contains links to updated related documents;
Time - the time when the changes were done;
User - the user name who did the changes.

Log into document field

Besides the documents' updates logging into app you also can log them into a special field of changed document. By default the field name is defined by the variable DE_LOG_FIELD of the script library DocExtLib with the initial value "Log". You can either change value of the variable value or set a value that differs from the default by the tag LOG_FIELD in a DocExt\Doc config. The field must be placed on the document form with the option "Allow multiple values" and the values separator "New Line" in order to correctly display the document updates log.


Topic links:

DocExt\Doc config

Script Library Variables

Delayed documents update

See also:

Application DEC