Creating a Dynamic Path for Storage Locations

When defining image storage locations, start by setting up an imaging server. For example, the server for storing images might be named "imageserver." Under that server create directories to use for dynamic storage. For example, you might create directories described in the following table and the corresponding network paths:

Storage ID

Network Path

apinvoices

\\imageserver\apinvoices

signatures

\\imageserver\signatures

packinglists

\imageserver\packinglists

To create a dynamic path for a storage location the following criteria must apply:

The path subroutine processes images being saved to the storage ID and creates an additional partial path to the storage location. This path is a combination of the base path defined for the storage ID and the dynamic path determined by the system information. The following table describes how the system creates the dynamic path:

For attachments to...

The system...

Entity records

adds the partial path \Entity ID\.

Activity logs

adds the partial path \Entity ID\.

Ledger records

adds the partial path \Entity ID\Shipping Br\Date\. The date displays as a two-digit month followed by a two-digit day followed by the four-digit year (mmddyyyy). For example, May 12, 2003 displays 06122003.

All other records

stores images in the base folder. In this example, images would be stored in imageserver.

For example, if you attach an image to a ledger record, the system first creates a new folder for the customer or vendor ID. It then creates a sub-folder within that folder named with the branch number. Finally, it creates a sub-folder to the branch folder named with the eight-digit date naming scheme, followed by the file name. An A/P entry person would do the following to use dynamic storage:

  1. Create an A/P Entry record.

  2. Activate the imaging software.

  3. Ensure the profile is correct.

  4. Select the A/P invoice image.

  5. Click Attach to attach the image to the record.

The base storage path on the Document Storage Location Maintenance screen is \\imageserver\apinvoices. The system does the following to create the dynamic path to the storage location:

  1. Checks the ledger record to which the image is attached.

  2. Reads the vendor's ID (for example, 1234).

  3. Reads the record's shipping branch (for example, Branch 2).

  4. Reads the record's date (for example, 08152002).

  5. Assigns a file name to the image (for example, 00012345.tif).

  6. Creates the following dynamic path: \\imageserver\apinvoices\1234\2\08152002\00012345.tif.

The system creates a new path for every image. If the record has an entity ID that is the same as an existing entity ID, the system looks at the branch, and either stores the image in an existing branch folder or creates a new entity folder. It then looks at the date and either stores the image in an existing date folder or creates a new date folder.

From the A/P example above, the following table describes more examples of paths the system creates for dynamic storage:

If you attach...

The system stores the image in...

another image for an A/P invoice and the vendor ID is 3746, the branch is branch 1, the date is 08152002, and the file name is 34567.tif

the dynamic path \\imageserver\apinvoices\3746\1\08152002\00034567.tif.

another image to the same vendor, but for a different branch (branch 2), with the same date, and the file name is 00056789.tif, the path is the same through the vendor number (\\imageserver\apinvoices\3746)

a new system-created folder for the vendor for Branch 2 before adding the date and the file name. The dynamic path to this image is \\imageserver\apinvoices\3746\2\08152002\00056789.tif.

an image to a product record, because there is no associated customer or vendor ID, no branch, and no date

in the base directory.

an image to a record that is not tied to a branch and a date (for example, a customer record)

 the customer ID folder.

See Also:

Defining Document Storage Locations

Planning File Storage