Attachments and Linkages in a Document Flow
Attachments
In CRM you can add to the contents of business objects, such as service orders, activities or opportunities, by attaching “unstructured” data in the form of text documents, e-mails, CAD graphics or multi media objects. This data can be imported, as is done in e-mail attachments, or you create the attachment by entering the information directly into the corresponding editor. CRM provides editors for most of the common document formats.
When you create an attachment the system automatically generates a link between the attachment and the relevant business object. This ensures that the attachment is uniquely assigned to a concrete business object. The system also saves management data, without which the attachment objects would not be accessible. Link entries and management data are saved in the database.
Depending on the application, attachments are created either via the tab strip Attachments or via the tab strip Documents . Unlike business objects, attachments are not saved in the database. They can be transferred either to CRM Content Management or the ArchiveLink Service.
What happens to the attachments, links and management data belonging to a CRM business object when it is archived, depends on how the attachment was stored.
CRM Content Management
When an attachment is transferred to CRM Content Management, it is actually stored in a Content Repository, which is a logical unit within a storage system. A content repository can physically reside in, for example, a database or a file system.
For more information about this topic see the CRM Content Management documentation.
What is being archived?
When you archive a business object that has an attachment, the link between the two is also archived, but is not deleted. During archiving the corresponding link entry is marked automatically with the archiving indicator ARCH_FLAG, (see graph). The management data is archived and then deleted. The attachment itself is never archived, because it has already been saved securely on a storage system.
You can display attachments of archived business objects at any time, as long as the management data and the attachment still exist.
The following example shows the archiving of a CRM Lead and its attachment:
ArchiveLink
With this method, the attachment is stored in an external storage system, which is connected to the SAP System via the ArchiveLink Interface. The link data is saved in the database, while management data is not produced.
What is being archived?
Here, too, the link data is archived together with the business object, but is not deleted. The attachment remains in the storage system. The link entries guarantee that for an archived business object you can display the attachments that were stored via ArchiveLink.
The following graph shows the storage scenario for the Lead example:
Linkages within the Document Flow
In CRM the relationship between successive business objects of a business process is saved as a link entry in the document flow. In this way it is possible to see later in which order the business objects within the business process were created and which preceding and subsequent document the business object has.
When a business object is archived all the link entries that belong to it within the document flow are archived together with the object. In the data archiving delete phase the delete program checks if the business object to which the link is referenced still exists in the database. If this is the case, nothing else occurs. If the object was already deleted, the corresponding link entry is also deleted. This process ensures that the link entries between two objects are only deleted after both objects have been archived and deleted.
In addition to links between business objects, there are also links between business objects and other objects, such as BDocs or replicated documents in the ERP system. These links are always deleted.