Support for Documents and Attachments in Salesforce (version 3.2.91w)
By Michael Bock - July 24, 2015
We are pleased to announce that RapidiOnline now has full support for Documents and Attachments in Salesforce - this enables you to upload any kind of files in an easy way for access by all or selected Salesforce users.
Have Direct Access to Original Files from Your ERP inside Your CRM
This can for example be used to upload PDF files for invoices as attachments to for example the sales history object that RapidiOnline provides for free. In the Sales History object, we usually insert all the data about each invoice coming from the ERP system. Now you can additionally attach the invoice itself, so that your sales people can directly access the original invoice PDF from the ERP system.
This new feature can be used to attach any kind of files to any object in Salesforce (both standard and custom objects are supported - it requires that the object has support for attachments enabled). The feature also supports Documents in Salesforce - you can here upload or download any kind of file to a selected folder in Salesforce.
New Function ReadFile(directory, filename)
To be able to get files from you local system, we have added a new function called "ReadFile". The ReadFile function takes two parameters, a directory and a file name. It will go to the local filesystem on the computer where the formula is evaluated and read the file content into an internal binary object for the transfer.
Starting from version 3.2.90d we are by default evaluating formulas on the Source RapidiConnector. This means that when reading from e.g. MS Dynamics NAV or AX or another locally installed system, the ReadFile formula will evaluate on the computer or server where the RapidiConnector is installed and this is perfect for our purpose of reading files from the local file system or a network drive accessible from that computer.
##ReadFile('C:\invoices', 'INVOICE_'+"No"+'.PDF') ---> read file C:\invoices\INVOICE_A001001.PDF (if the "No" field has the value "A001001" for example).
Reading File Content From a Database
You can also get the content for the Attachments or Documents from a varbinary or image field in a database table. You just setup this field as source and the Body field of the Attachment or Document as destination in the Field List mapping.
We support these field types in most databases, including MS-SQL server and also most ERP systems like MS Dynamics NAV, AX or GP are supported.
Reading Blob Fields From MS Dynamics NAV
If you are reading file content from a Blob field that is used by MS Dynamics NAV, then you need to disable compression on the field in MS Dynamics NAV. In the object designer in MS Dynamics NAV, navigate to the table in questions and open it in edit mode, then select properties on the Blob field in questions and set the "Compressed" attribute to "No" (default is Yes). This will remove the compression of the field content and make it interchangeable with other systems.
MyRapidi Configuration Example
The first use case is to upload and attach invoice PDF files that you have generated in your ERP system and stored in your local file system. Each invoice PDF has a unique file name consisting of the word "INVOICE_" followed by the invoice number, and with a suffix of .PDF - like "INVOICE_A0010023.PDF" (where A0010023 is the invoice number).
Furthermore to ensure that we already have transferred the Invoice Header to Salesforce and also to reduce the number of Salesforce API calls, we asume that you have added a new field called "ExternalId" (Text30) to the "Sales Invoice Header" table in MS Dynamics NAV and have another separate transfer that updates this field with the Invoice_Header Id from Salesforce. In this way we have the Id of the Invoice to attach the file to available directly in the source table in MS Dynamics NAV.
To have these invoice files transferred to Salesforce.com and attached to the corresponding SalesHistory Invoice, we would make a transfer as follows:
To use this new feature, you need to be on version 3.2.91w or later on both the RapidiCentral and RapidiConnectors.
We hope you find this new feature usefull and as always, any comments are most welcome
Want to learn more about RapidiOnline's configuration interface and work more efficient with your Service, then sign up for our MyRapidi Customer Webinars.
About the author
Michael founded Rapidi on technological excellence, fantastic customer service and continuous improvement. A data integration specialist since 1987, he remains focused on creating technology that solves real business problems.