Lesson 12: External File Storage
Part 4: Implementation and Configuration
With Acumatica ERP, you can conveniently store files, such as temporary internal instructions, inventory item images, or scanned images of original vendor invoices. You import the files to the system and attach them to ERP records, record details, documents, notification templates, and wiki articles. You can easily manage and track the imported files. In Acumatica ERP, the imported files are stored in the Acumatica ERP database by default. Alternatively, you can select another place where files should be stored—in a local folder on the machine running the Acumatica ERP website or in a public storage service, such as Azure Blob or Amazon S3.
Lesson Objectives You will read about the following (you do need to perform the steps to pass the training):
- How to set up storing attached files by using the Azure Blob Service?
- How to set up storing attached files by using the Amazon S3 Service?
- How to set up storing attached files in a local folder on the server running the Acumatica ERP web site?
- How to set up automatic file synchronization? | File Attachment Management | 156
File Attachment Management
File Types and Size Preferences In Acumatica ERP, you can allow or deny the importing of specific file types (by their extensions) and set a maximum size for imported files. You can use the File Upload Preferences (SM202550) form to view and edit the file types and sizes that users may import to the site.
File Attachments To import the file and attach it to the ERP record, document, notification template, wiki article, or record detail, you use the Upload File dialog box. For more information on importing and attaching files, see the following topics:
- To Attach a File to a Record and To Attach a File to a Record Detail in the Acumatica ERP Interface Guide.
- To Add a Graphic in the User Guide.
File Name Changes When files are imported, the system modifies their names as follows: - For a file attached to a record, the resulting name consists of the form name, a record ID in parentheses, a backslash, and the name of the file. Example: Journal Transactions (GL333234231)\Note.txt or Bills and Adjustments (INV0023572)\Orig_doc.jpeg.
- For a file attached to a record detail, the resulting name consists of the form name, a record ID and record detail ID in parentheses, a backslash, and the name of the file. Example: Journal Transactions (GL333234231 3)\Note.txt.
- For a file attached to a wiki article, the resulting name consists of the wiki article name and the
name of the file, separated by a backslash. Example: Role-Based Access\Users.gif.
File Searches You can use the following forms to find the files imported to the system: - Search Form (SE000040): On this form, you can search for a file by its name or part of the name, or by the comment specified during file upload. You can also search by the type of object it is attached to (article or system entity); you can also include in the search files not attached to any system entity.
- Search in Files (SM202520): By using this form, you can specify the following criteria in your search:
- What the file name (or part of it) is
- When the file was added
- Who added the file
- Who is editing the file (if the file is checked out for edit)
- What document type the file is attached to
When you first use the system, the tree in the left pane of the Search in Files form may contain only one root node, which is populated as users attach files to the records, record details, or wiki articles. A module appears on the site tree only after at least one file has been attached to a record (such as a batch, bill, or invoice) created on a form of the module. The system doesn’t check the access rights to file attachments for a user who searches the files by using this form.
| File Attachment Management | 157
For more information, see To Manage Files in the User Guide.
Version Maintenance You can import and maintain an unlimited number of versions for any file. For each new version of the file, provide a comment to inform users about modifications to it. This will help users find the file and file version they need. For more information, see To Manage Files in the User Guide.
File Storage Configuration By default, the system stores the files attached to documents in the Acumatica ERP SQL Server database. Alternatively, the system can store the files outside of the database—either in a local folder on the computer running the Acumatica ERP website, or in a public cloud using Azure Blob Storage or Amazon Simple Storage Service (Amazon S3). To use an external file storage, you must have an account with the provider and configure the file storage to be used by your Acumatica ERP instance. For more information, see Blob Storage on the Windows Azure portal and Amazon S3. You use the External File Storage (SM202540) form to configure external file storage providers and specify where files should be stored. With regard to file storage functionality, provider denotes the storage provider, which can be a local folder, Azure Blob service, or Amazon S3 service. If you created multiple companies in your Acumatica ERP instance and want to store file attachments out of the database in any of these companies, you need to configure an external storage provider for each company individually. It can be the same provider for all companies or a separate provider for each company.
Access Rights A single file attachment can be attached to multiple wiki articles, notification templates, and templates for email. By default, access rights are not set directly for file attachments. Access rights for the file attachment are inherited from their rights for the system entity it was first attached to. By using the File Maintenance form, you can define the primary document or article from which roles inherit access rights to this file. Also, you can make the file available to all users. For more information, see To Manage Files in the User Guide.
File Deletions When you actively import files into the system, you can accumulate unnecessary files if either or both of the following is true:
- You don’t delete the files that were attached to the ERP records, documents, notification templates, or wiki articles that were deleted from the system.
- You update the files with versioning turned on and leave the outdated versions of files.
It is a good practice to delete outdated and unnecessary files from the system to minimize the use of file storage. Try to delete these files (and versions of files, if applicable) regularly. | Step 12.1: Storing Attached Files by Using the Azure Blob Service | 158
Step 12.1: Storing Attached Files by Using the Azure Blob
Service
In this step, you will configure the Azure Blob provider and switch file storage to the provider. Your company must have an Azure account with the configured blob in Azure Blob storage. For more information, see Introduction to Microsoft Azure Storage: Blob Storage and About Azure Storage Accounts.
Perform the following:
- Sign in to your Acumatica ERP instance.
- Navigate to the External File Storage form (SM202540; Configuration > Document Management > Configure).
- In the Provider box, select Azure Blob Storage.
- In the table, enter the following information in the Values column and save the changes, as shown in the following screenshot:
- Account: The name of your storage account in the Azure Blob storage service—for example, myaccount.
- Container: The name of the container in your Azure Blob storage where you want to store files from your Acumatica ERP instance—for example, files.
- Key: The 512-bit access key to your storage account in the Azure Blob storage service—
for example, ubYUHyb8PUdy7R7yDITILMp5NN9usQYeS5?0RPAO70ikBO09t4nVYbJeuGILN/
qS72p9AmOtXb4MUh+wMu$GKnwC.
Figure: Configuring external file storage
- On the form toolbar, click Enable Provider.
- On the form toolbar, click Switch Direction to allow Acumatica ERP to save uploaded files to the external storage.
- If you want to move all the files that are stored in the system to the external storage, click Move Files to Storage on the form toolbar. | Step 12.2: Storing Attached Files by Using the Amazon S3 Service | 159
Step 12.2: Storing Attached Files by Using the Amazon S3
Service
In this step, you will configure the Amazon S3 provider and switch file storage to the provider. Your company must have an Azure account with the configured blob in Azure Blob storage. For more information, see Introduction to Microsoft Azure Storage: Blob Storage and About Azure Storage Accounts.
Do the following:
- Sign in to your Acumatica ERP instance.
- Navigate to the External File Storage form (SM202540; Configuration > Document Management > Configure).
- In the Provider box, select Amazon S3 Storage.
- In the table, enter the following information in the Values column and save the changes, as shown in the following screenshot:
- AWS Access Key: The access key ID of the storage bucket—for example, AKIAIOSFODNN7EXAMPLE
- AWS Region Endpoint: The short name of the AWS region—for example, us-east-1
- AWSSecretkey: The secret access key of the S3 storage bucket—for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- BucketName: The name of the storage bucket that will be used to store Acumatica ERP files—for example, files
- PathPrefix: The user-defined folder where the files will be stored—for example, /
mycompany/acumatica
Figure: Configuring external file storage
- On the form toolbar, click Enable Provider to save the provider settings.
- On the form toolbar, click Switch Direction to allow Acumatica ERP to save uploaded files to the external storage.
- If you want to move all the files that are stored in the system to the external storage, click Move Files to Storage on the form toolbar. | Step 12.3: Storing Attached Files in a Local Folder | 160
Step 12.3: Storing Attached Files in a Local Folder In this step, you will configure the system to store files in a local folder on the server running the Acumatica ERP website. Do the following:
- On the server running your Acumatica ERP website, create a folder to store the files (for instance, C:\FileStorage) and make sure that the account used to run the Acumatica ERP website has write access to the folder you created.
- Sign in to your Acumatica ERP instance.
- Navigate to the External File Storage form (SM202540; Configuration > Document Management > Configure).
- In the Provider box, select Local Files Folder.
- In the table, in the Value box for the added row, enter the path to the folder you created in Step
- Select the Allow Saving Files check box.
- On the form toolbar, click Enable Provider to save the provider settings.
- On the form toolbar, click Switch Direction to allow Acumatica ERP to save uploaded files to the external storage.
- If you want to move all the files that are stored in the system to the external storage, click Move Files to Storage on the form toolbar. | Step 12.4: Setting Up Automatic File Synchronization | 161
Step 12.4: Setting Up Automatic File Synchronization You can use automation schedules to perform periodic synchronization between a file on an Acumatica ERP site and a file on a local computer or network. You can find the file whose synchronization you want to schedule by using the Search in Files (SM202520) form, configure file synchronization by using the File Maintenance (SM202510) form, and then schedule the synchronization on the File Synchronization (SM202530) form. Before you start configuring synchronization between a file on your Acumatica ERP website and a file or folder on your local network, share the folder (which includes the file to be synchronized or which will itself be synchronized with the file on the Acumatica ERP website) through your operating system. Make sure the folder is shared with proper rights for writing. Synchronization (of the export type) with a folder means that each time synchronization is performed, a new file with the appropriate date and time stamp is created in the specified folder.
In this step, you will configure file synchronization. Do the following:
- Sign in to your Acumatica ERP instance.
- Navigate to the Search in Files (SM202520; Configuration > Document Management > Explore > Search in Files).
- To find the file, on the form, do one of the following:
- In the Selection area, specify criteria to help you find the file. This criteria can include the file name (or part of the file name), the time interval of the import, and the name of the user who imported the file or checked it out. The table in the right pane lists the files that match the criteria you specified.
- In the left pane, navigate to and select the form to which the file is attached. The table in the right pane lists the files attached to the entities created by using the form you selected in the left pane.
- In the right pane, click the file to open the File Maintenance form for this file and view file properties.
- On the Synchronization tab, select the Synchronize check box.
- In the Synchronization Type box, select Shared Folder.
- In the Path box, enter the path to the shared folder on a local network computer.
- In the Login and Password boxes, type the login and password of an account with sufficient
rights to allow system access to the shared folder (see the following screenshot).
If you synchronize files with an FTP server, you should use a login without the @, /, or \ characters
in synchronization settings. Otherwise, Acumatica ERP will not be able to connect to the server.
| Step 12.4: Setting Up Automatic File Synchronization | 162
Figure: Setting up synchronization settings - To configure synchronization with the folder, do the following:
- Select the Synchronize Folder Content check box.
- In the Import File Validation Mask box, enter a validation mask for the files in the folder that are involved in synchronization.
- On the form toolbar, click Save. After you have configured the file synchronization, you can perform synchronization manually by using the File Synchronization form. Alternatively, you can assign it to a schedule to be performed automatically by using the Automation Schedules (SM205020) form. | Additional Information | 163
Additional Information
The following concept is outside of the scope of this course but may be useful to some readers. You can use the link below to get additional information.
Scheduled Processing In any ERP system, such tasks as the processing of documents or the validation of accounts require significant time and system resources. As such, they should be processed at times when there are no employees at work, such as weekends or nights. Other processing, such as releasing or posting documents, takes less time but also should be performed regularly, with a frequency determined by your business needs. In Acumatica ERP, if the Scheduled Processing feature is enabled on the Enable/Disable Features (CS100000) form, you can set up automated processing for most processing forms instead of initiating the processing manually. For more information about the scheduling, see Scheduled Processing in the Acumatica ERP User Guide. | Lesson Summary | 164
Lesson Summary
In this lesson, you learned how to manage file attachments in Acumatica ERP and how to configure external file storages. Review Questions:
- How would you set up storing attached files by using the Azure Blob Service?
- How would you set up storing attached files by using the Amazon S3 Service?
- How would you set up storing attached files in a local folder on the server running the Acumatica ERP web site?
- How would you set up automatic file synchronization? | Part 5: Performance Monitoring and Troubleshooting | 165