Creating New Profile
Creating a new profile will allow users to attach their files and store them in storage servers of their own choice. Users need to create Profiles for specific servers such as Amazon S3, Azure Blob, or Local Disk using the New Profile Button and further integrate it with the specific server
Setup->Install Packages-> Configure->New Profile
Creating New ProfileSalesforce administrators can also create multiple storage profiles for the same type of storage server if required. E.g. say your organization is using 2 different buckets for storage of files based on country. You can create two profiles for each country pointing to a respective bucket of Amazon S3. So this way both profiles will be of type Amazon S3 but pointing to 2 different buckets
Example: Suppose, your organization stores attachments in two different buckets, as per the billing country name on Account record
Profile 1: AmazonS3_India
Profile 2: AmazonS3_United_States
For satisfying these criteria, you can create two different Storage Profiles as mentioned above with the same type of Storage Server (AmazonS3 in this case) with different bucket names (say India and United States). In the Visualforce page created for Attachments Expert, you will have to can enter this criteria either by formula field or directly place the condition in the Visualforce page as follows: The below example shows how to update the Visualforce page for Account object so as to save attachments in the required bucket
Option 1: Formula Field
In the Account object create a new formula field. Eg. Account_StorageProfile and enter the following formula in this field
Formula : IF(BillingCountry == ’India’,’AmazonS3_India’,’AmazonS3_United_States’)
Now enter the following code to the Visualforce page for Account object:
Option 2: Visualforce Page Code Changes
Create a new Visualforce page for Attachments Expert on Account object eg. Accounts_Attachments and enter the following code in it:
After making the above change in the Visualforce page, attachments with the respective country will be saved in the bucket as required by your organization
Supported Servers:
Currently the supported Servers are:
Amazon S3
Users can save their files on Amazon Server by Creating a New Profile for Amazon S3 or by selecting Amazon S3 in the default server settings and integrate it with their respective Amazon S3 server
Setup->Install Packages-> Configure> Amazon S3
Instance Storage Server SettingFollow the below steps to create a Storage Profile for Amazon S3
Click on the New Profile or default Storage Profile for creating Amazon S3 Profile
Select the Storage Type as Amazon S3
Provide the Access Key and Secret Key for your Amazon S3 server
Provide the bucket name used by your organization for Amazon S3(For detail settings on bucket name please refer Remote Site and CORS Settings for Amazon S3 explained below)
Click on Save in order to save the Amazon S3 Storage Settings
Amazon S3
Remote Site Settings-
While saving attachments on Amazon S3, user needs to specify the bucket name in which the attachment needs to be saved at the server side
While saving this setting, user might get the following error while saving the profile settings for Amazon S3
To avoid this error user will have to add the following remote site settings to their salesforce instance: The below example will show how to add ‘multipart’ bucket settings to salesforce: Go to Setup -> Security Controls -> Remote Site Settings Create a new page with the following specification
Remote Site Name: Multipart (Bucket Name as specified in your server)
Remote Site URL: https://multipart.s3.amazonaws.com
Check the Active box
Save the settings
Note: In the above example, Remote Site Name can consist any name which the user prefer. The Remote Site URL should consist of the specified URL only with the respective bucket name in place of ‘multipart’
CORS Settings -
When you save your settings a CORS setting will be done on your bucket so that this application can access that bucket. If you like to restrict the permissions to the bucket in anyways through CORS please go to your amazon account, and change the CORS configuration
An example setting is given below which is likely be set by this application. This setting gives access to your bucket from any salesforce instance and application
Azure
User can save their files on Azure Server by Creating a New Profile or for Azure or by selecting Azure Blob in the default storage server settings and integrate it with their own Azure Blob Server
Instance Storage Server Setting-
Click on the New Profile for creating Azure Profile
Select the Storage Type as Azure
Provide the Account Name and Account Key
Click on Save in order to save the Azure Storage Server Setting in the Instance
Container name will be the name of the folder on Azure server which your organization uses to save the attachment
Setup->Install Packages-> Configure-> Azure
Remote Site Settings -
While saving attachments on Azure Blob, user needs to specify the account name in which the attachment needs to be saved at the server side
For this it is possible that the user gets the following error while saving the profile settings for Azure Blob
To avoid this error user will have to add the following remote site settings to their salesforce instance:
The below example will show how to add ‘attachments expert’ account settings to salesforce: Go to Setup -> Security Controls -> Remote Site Settings Create a new page with the following specification:
Remote Site Name: Azure Blob Service (Account Name as specified in your server)
Remote Site URL: https://attachmentsexpert.blob.core.windows.net
Check the Active box
Save the settings
CORS Settings -
When you save your settings a CORS setting will be done on your Account, so that this application can access that account. If you like to restrict the permissions to account in anyways through CORS please go to your azure account, and change the CORS configuration
Local Disk
User can save their files on their Local machine where IIS has been configured for Attachments Expert by Creating a New Profile for Local Disk and integrate it with the Local Disk. Select the “Storage Profile” as “Local Disk” while uploading the file
Prerequisites for saving the files on Local Disk
IIS should be configured for Attachments Expert
Instance Storage Server Setting
Click on the New Profile for creating Local Disk Profile
Select the Storage Type as Local Disk
Enter the path from the local machine where the attachment needs to be stored in the Base folder
Enter the host website created in IIS server in the Service URL
Click on Save in order to save the Local Disk Storage Server Setting in the Instance
Note: The base folder path mentioned in the above settings should have Read/Write access rights
FTP Server
User can save their files on their FTP server through Attachments Expert by Creating a New Profile for FTP Server and integrate it with the corresponding FTP Server. Select the “Storage Profile” as “FTP Server” while uploading the file
Prerequisites for saving the files on Local Disk:
FTP Server should be configured on your local server and should be accessible outside the local server. Instance Storage Server Setting
Click on the New Profile for creating FTP Server Profile
Select the Storage Type as FTP Server
Enter the address/IP of your FTP Server (Please note you can add address and port number of your FTP server by using “:”.
Enter the username and password for your FTP Server
Enter the Base Folder where you want to save your attachments (e.g. FTP. So attachments will get saved in the FTP folder created in the physical path provided in the FTP server standalone build. E.g. If “D:/Attachments” is the physical path provided in the FTP Server, then attachments will get saved in “D:/Attachments/FTP”.)
Enter the website url created in IIS server in the Service URL field
Click on Save in order to save the FTP Storage Server Setting in the Instance
Note: The base folder path mentioned in the above settings should have Read/Write access rights
SFTP Server
User can save their files on their SFTP server through Attachments Expert by Creating a New Profile for SFTP Server and integrate it with the corresponding SFTP Server. Select the “Storage Profile” as “SFTP Server” while uploading the file
Prerequisites for saving the files on Local Disk
SFTP Server should be configured on your local server and should be accessible outside the local server. Instance Storage Server Setting
Click on the New Profile for creating SFTP Server Profile
Select the Storage Type as SFTP Server
Enter the address/IP of your SFTP Server (Please note you can add address and port number of your SFTP server by using “:”
Enter the username and password for your SFTP Server
Enter the Base Folder where you want to save your attachments (e.g. SFTP. So attachments will get saved in the SFTP folder created in the physical path provided in the SFTP server standalone build. E.g. If “E:/attachments.expert” is the physical path provided in the SFTP Server, then attachments will get saved in “E:/attachments.expert/SFTP”.)
Enter the website url created in IIS server in the Service URL field
Click on Save in order to save the SFTP Storage Server Setting in the Instance
Note: The base folder path mentioned in the above settings should have Read/Write access rights