Document Generic Events
Document generic events do not fall under other document event categories.
Document generic event sequences
The following lists show the events that occur for document generic commands in the sequence they occur.
Change document type event sequence
- DocGenericEvent_PrepareCommand
- DocGenericEvent_PreInitializeChangeDocumentType
- DocGenericEvent_InitializeChangeDocumentType
- DocGenericEvent_PreBeforeChangeDocumentType
- DocGenericEvent_BeforeChangeDocumentType
- DocGenericEvent_AfterChangeDocumentType
- DocGenericEvent_BeforeNewDocument
- DocGenericEvent_OnProperties
- DocGenericEvent_AfterNewDocument
- DocGenericEvent_TerminateChangeDocumentType
AfterCreateReference event
Occurs after a user manually creates a reference between documents.
Syntax
DocGenericEvent_AfterCreateReference(Batch, RefType, TargetDocument, [RefDisplayName])
| Name | Description |
|---|---|
| Batch | An object that represents the current batch of documents. |
| RefType | Name of the reference type assigned to the reference. |
| TargetDocument | Document object to which the reference was made. |
| RefDisplayName | Name assigned to the reference. |
BeforeReplaceContent event
Occurs before a user replaces the content of documents.
Remarks
Importing a document using drag and drop on a released document creates a new revision. Depending on your organization's business process, the document might need to be placed in a different workflow state for review before the new content is released. Perform that action in this event.
If this event handler is not customized, an Access is denied: error results and the action fails. If the document should remain in the released state after the import, implement this event handler to place the document in a different workflow state and then release the document in the DocGenericEvent_AfterNewDocument: event handler.
By default, the system deletes redlines for existing document content when the content is replaced. To retain redlines, set the AS_CONFIRM_CLEANREDLINESONREPLACECONTENT: constant to False: in this event. The default is True:.
OnProperties event
Occurs when a user views or edits the property pages of a document or folder.
| Constant | Action | PowerWeb | Meridian Desktop |
|---|---|---|---|
| AS_PS_CMD_VIEW | The user started viewing the property page. | Not included | Included |
| AS_PS_CMD_EDIT | The user clicked Edit: to start property page editing. | Included | Included |
| AS_PS_CMD_APPLY | The user clicked Next: to apply changes. | Included | Included |
| AS_PS_CMD_FINISH | The user clicked Finish: to apply changes and stop editing. | Included | Included |
Use this event with caution. In Meridian Desktop, when Command: includes AS_PS_CMD_VIEW:, setting Abort: to True: prevents display of all property pages. Attempting to set property values at that time can cause errors such as "The object is currently being edited by another session": and lost data.