Administration Features and Functions > Attachment Maintenance > Using Attachment Maintenance
Using Attachment Maintenance
Use Attachment Maintenance to define attachments and attachment areas for fields and programs. The Attachment Maintenance screen has three areas:
Document Type
Program Name
Attachment Area

Attachment Maintenance
Document Type
Use this area to identify the attachments in the system. When you have defined a document type and label, the system searches for the document type when you run the program, and displays the attachment defined for the field value associated with this document type.
Data Type
Specify a data type identifier for organizing attachments. The data type name should relate to the program to which you are adding attachments.
Specify a label for the attachment area.
For translation purposes, if you use the $ variable to specify the label, the system looks for the label in the database and translates the term accordingly. For example, if you use the label ${SALES_ORDER}, the system retrieves the translation for the term and displays the term Orden Ventas in a Latin Spanish installation.
Program Name
Program Name
Specify a program for which you want to include attachments. You must also specify a field. The wild card character * can be used to match a range of programs, for example "so*.p" A blank program name matches the field anywhere.
Key Field
Specify a field that will trigger acceptance of attachments (required).
Note: You delete a document type or program name by clicking the arrow to the left of the row to select the row, and pressing Delete.
Attachments Area
This area displays attachments for the selected data type in the Document Type area. You associate attachments with specific values for a given field. The lower part of the area displays possible field values. When you click on one of these values, the attachments associated with the value are displayed in the upper part of the area.
Enabling Attachments
To enable attachments for a program field:
1 In the Document Type area, enter a data type and label for organizing attachments.
2 In the Program Name area, enter a program name (optional) and a key field (required). If you do not enter a program name, the ability to add attachments will be available whenever the focus is on the specified field. If you do enter a program name, the ability to add attachments will be available when the focus is on the field in the specified program.
Adding Attachments
In the Attachments area, you specify a field value and select an attachment as follows:
1 Select a document type. This displays the fields already defined for this document type, if any.
2 Place the cursor in the Field Value area and right-click.
3 Select the Insert option. This positions the cursor in the name field.
4 Type the value of the field. For example, to add an attachment to the Purchase Order 114, select the type, position the cursor in the Field Value area, right-click to select Insert, and type the code.

Entering a Field Value
5 Place the cursor in the upper part of the Attachments area, right-click, and choose Attach. (Alternatively, you can click the Attach button.)

Defining an Attachment
6 Browse to a file on your local computer and select it.
7 Click Save.
You can also drag-and-drop an attachment from your desktop area or Windows Explorer folder.
8 Run the program to view the attachment for the specified field.

Purchase Order with Attachment
Deleting an Attachment
The Delete function is a right-click option either in Attachment Maintenance, or in the Attachments area of the program. In Attachment Maintenance:
1 Place the cursor in the upper part of the Attachments area, right-click, and choose Delete. (Alternatively, you can click the Delete button.)
Attachment Properties
You can view the key used for attachment areas by right-clicking the area and selecting Properties. This key also displays the location of the attachment.

Attachment Properties
Attachment Security
You can restrict the use of Attachment Maintenance by specifying attachment administrators in the <AttachmentAdministrationRoles> field in the client-session.xml file:
where role1,role2 is a comma-separated list of roles.
The default administrator roles are qadadmin and superuser.
Automatic Attachment Areas
The system automatically creates attachment areas for certain program fields.
Some lookup browses within programs are defined with additional Edit program links. For example, the Sales Order Browse lookup (gpbr239) is defined in Browse Link Maintenance with an Edit link to Sales Order Maintenance, which ensures that Sales Order Maintenance is a right-click option on sales order records when you run the browse.

Sales Order Lookup, Browse Link Maintenance
Because the Sales Order lookup has an edit link for Sales Order Maintenance, the lookup field has an automatic attachment area, based on the name of the edit program (Sales Order Maintenance). Lookup fields with Edit links display an automatic attachment area in every program in which the lookup field is used. For example, this lookup is also used in Sales Order Credit Maintenance, and this program also displays the automatic attachment area.

Sales Order Credit Maintenance
Use Browse Link Maintenance to create Edit links for lookups, and to identify existing links.
Attachment Storage
By default, attachments are stored in TomcatInstallDir/webapps/qadhome/
config-name/storage/attachments, where subdirectories organize the attachments based on domain, program, type, and field. Each directory includes an underscore character (_) at the end by default to account for the possibility of using a blank. In addition to the default storage option, two other options for storing attachments are available. For more information on attachment storage, see the following:
Default Attachment Storage
Single WebDAV Repository Attachment Storage
Database and WebDAV Repository Attachment Storage