Overview of Attachments

The attachments feature enables users to link unstructured data, such as images, word processing documents, spreadsheets, or text to their application data. For example, users can link images to items or video to operations as operation instructions.

Attachment information can flow through your entire application. For example, if you enable attachments for a part number, where users would attach images of the part, you can then enable attachments for all your other forms that refer to your part number. Users would then be able to see the image of the part wherever that part number occurs.

You can provide security to limit which attachments users can see from particular forms by assigning document categories to your form functions. Users then assign individual attachments to particular categories.

You can add the attachments feature to your application forms and functions without modifying form code, so long as your forms are built using Oracle E-Business Suite standards (starting with the Oracle E-Business Suite TEMPLATE form).

Definitions

It is useful to specifically define certain terms that have special meaning within the context of the attachments feature.

Document

A document is any object that provides information to support another object or action. Examples include images, word processing documents, spreadsheets, or text.

Entity

An entity is an object within Oracle E-Business Suite data, such as an item, an order, or an order line. The attachments feature must be enabled for an entity before users can link attachments to the entity.

In the context of attachments, an entity can be considered either a base entity or a related entity. A base entity is the main entity of the block. A related entity is an entity that is usually related to the block by a foreign-key relationship.

For example, suppose you have an Order Lines window that shows the contents of an Order_Lines block. The Order Lines entity would be considered the base entity of the Order_Lines block. If that block included a field called Product, the Product entity would be considered a related entity of the Order_Lines block. If you also had a Products window that shows the contents of the Products block, the Product entity would be considered the base entity of the Products block.

Entities and Blocks

Attention: The Orders/Order Lines/Products example used throughout this chapter is a generic example meant to illustrate attachments concepts. It is not to be confused with actual attachments setups used in Oracle E-Business Suite such as the attachments to purchase orders used in Oracle Purchasing. Those actual setups may differ considerably from our example.

Attachment

A document associated with an entity is called an attachment.

Attachment Function

A form or form function in your application cannot use attachments until the attachments feature is set up for that form or function; that is, it must be defined as an "attachment function" in the Attachment Functions window.

Document Category

A document category is a label that users apply to individual attachments and documents. Document categories provide security by restricting the documents that can be viewed or added via a specific form or form function.

When you set up the attachments feature, you assign document categories to particular forms or form functions. When a user defines a document, the user assigns a category to the document. The attachments form can query only those documents that are assigned to a category to which the calling form or form function is associated. A "Miscellaneous" category is seeded to provide easy visibility of a document across forms.

Related Topics

How Attachments Work

How Users Use Attachments

When a user is using a block in a form where the attachments feature has been enabled, the attachments icon is enabled in the toolbar (empty paper clip). If the user clicks on the icon, the Attachments window opens. In the Attachments window, the user can either create a new attachment document or attach an existing document to the base entity of the block.

Depending on how attachments have been set up, if a document has already been attached to the entity, the icon in the toolbar indicates that an attachment is present (paper in paper clip). If the user clicks on the icon, the Attachments window opens and automatically queries the attachment. For a given form function, the user only sees attachments whose assigned categories are available for that form function.

For some setups of the attachment feature, the Attachments window automatically queries attachments for the base entity of the block. To see attachments that are attached to related entities, the user checks the Include Related Documents check box. The Attachments window then queries those attachments as well as the attachments for the base entity.

However, the attachments feature can be set up so that all attachments for both the base entity and related entities of the block can be seen initially (without the user checking the Related Documents check box). The user cannot modify or insert attachments for the related entities in either case.

Behind the Scenes

When a user attaches a document to a record in a form, Oracle E-Business Suite stores information about the document, and the document itself (or its URL). Oracle E-Business Suite separately stores the attachment information that links the document to the record. Storing the linkage information separately allows users to attach the same document to multiple records.

The information that links the entity and the document is stored in an Oracle Application Object Library table, FND_ATTACHED_DOCUMENTS. That information includes the document ID and the entity name, combined with information from the record that uniquely identifies the instance of the entity (the entity record). For example, if you were to attach an image to a product in the products form, the attachment linkage information that would be stored would be the image document ID, the name of the products entity, and the primary key information that uniquely identifies the product (such as the product_ID). As you then move to other forms that show the product, those attachment functions for those forms would define, for the products entity, the primary key field as being the product_ID field (not also the order_ID field, for example). In this way, wherever the product entity appears in the application, the attached image would be available so long as the corresponding attachment functions were defined correctly).

The association between the form and the document is constructed as follows: the form is connected to a block, and the block is connected to an entity. Because the attachment linkage is stored with the entity name, combined with information from the record that uniquely identifies the instance of the entity (the entity record), the link between the form block and the document are derived at runtime through the entity.

Each document is associated with a category. Each attachment function is also associated with one or more categories, and at runtime, only documents whose categories are associated with the current attachment function (form) can be viewed or attached.

Related Topics

Attachments for Forms or Form Functions

To enable the attachments feature in a form or form function, you need to define information in the Attachment Functions window.

Registration at the form or form function level allows users to define attachment data at the appropriate level. If you want all form functions for a given form to have the same attachment capabilities, you can define attachment data at the form level and eliminate the need to enter redundant data for each form function. On the other hand, if you need different attachment functionality in a form function, you can define the data at the form-function level.

For example, the Bill of Materials form may have two form functions: one is used by design engineers, and the other is used by production engineers. If you want to allow a design engineer access to a broader range of document categories than production engineers, you will need to set up attachments separately for each of the two form functions. If you want attachments to act the same in both form functions you would define attachments data at the form level.

The Attachments logic first checks to see if the form function has attachment data defined. If it does, it uses that definition to run the attachments system. If no data exists for the form function, the form-level is checked for defined attachment data. If attachments data exists at the form-level, it is used to run the attachments system. If attachment data exists, the form caches information in three record groups that control how the attachment icon is displayed, and what functionality is available when the attachments form is invoked. If no attachment data is declared, the attachment icon is disabled and nothing will happen if the user clicks on the toolbar icon.

Registration of form or form function requires information at the following levels: Form, Block, Entity, and Category.

Related Topics

Attachments and Reports

Oracle Application Object Library provides database views of attachment document information you need when you want to report on attachment information for an entity. To provide security for reporting on attachments, we recommend that you register your concurrent program as an attachment function and associate one or more document categories with your concurrent program. You do not need to provide any block or entity information when you register your concurrent program as an attachment function, although you must define your concurrent program using the Concurrent Program window before registering it as an attachment function.