function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mxalix258mxalix258 

Retrieving document from another database

If I wanted to have some sort of button on a record in salesforce, and when I pushed it it would make a call out to another database and retrieve a document and attach it to the record in salesforce - is there a way to do that? Can someone point me in the right direction?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
SFDC_LearnerSFDC_Learner

Yes. It is possible for the files which are in smaller size.

 

The process is like below.

 

1. You should write an integration application either in Java / .NET  to connect to both salesforce and your database.

2. Webservice need to create for this application.

3. Generate WSDL file for this webservice and generate a class in salesforce. By calling specific method in this class, you can communicate to your java/.NET application. From that application read the file content from your database then add as an attachment in salesforce.

 

Need to consider:

-> view state limit

-> file size in memory.

 

Generally in salesforce we can insert 5MB of file as an attachment. If the file is bigger than this use Content management / ask salesforce.com customer to increate attachment size.

 

As per my experience this info i can provide you.

All Answers

Jean-NoelJean-Noel

You can do that with a webpage or a webservice. When you clik your button or link, it will call the webpage or webservice that will attach in salesforce the related document. The ObjectId will be one of the parameter that you'll need to send to the external (Of Salesforce) web service or webpage. 

SFDC_LearnerSFDC_Learner

Yes. It is possible for the files which are in smaller size.

 

The process is like below.

 

1. You should write an integration application either in Java / .NET  to connect to both salesforce and your database.

2. Webservice need to create for this application.

3. Generate WSDL file for this webservice and generate a class in salesforce. By calling specific method in this class, you can communicate to your java/.NET application. From that application read the file content from your database then add as an attachment in salesforce.

 

Need to consider:

-> view state limit

-> file size in memory.

 

Generally in salesforce we can insert 5MB of file as an attachment. If the file is bigger than this use Content management / ask salesforce.com customer to increate attachment size.

 

As per my experience this info i can provide you.

This was selected as the best answer
mxalix258mxalix258

Is there a preferred database to use?

SFDC_LearnerSFDC_Learner

We use SQL Server / Oracle / DB2 for this.