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
PrabhaPrabha 

FTP out the Account hierarchy

Hi Gurus,

 

I have been working on a requirement which includes FTP integration. 

 

The requirement is that we need to send all the Accounts with their child records in csv to an FTP server. And Accounts alone are morethan 100,000 records.

 

We started working trembling, we used apex classes for each 5000 records as the heap is getting heavier for a single class. Now there are multiple chunks coming out of that apex class files.

 

We tested it with a button in VF page and class. And we used the same to send a mail. Successful. Then we tested the same with apex scheduler as the requirement demands that entire hierarchy is to be sent every by 8:00 PM. 

 

Now we got stuck at the part of integrating it with FTP. 

 

We have been searching a lot, and some older posts said that "we can not ftp out any files directly from cloud".

 

And also this .. http://www.chiragmehta.info/chirag/2010/03/22/salesforce-ftp-integration-data-loader-web-service-http/

 

........................................................

 

All we are trying to do is to send the file to an FTP. Is there anybody out there who did such kind of integration, please send some workaround.

 

sfdcfoxsfdcfox

FTP is transactional in nature (in case you've never looked at RFC 959), so you can't directly instantiate FTP over Apex Code. You have to have a bridge somewhere, either a Java servlet, a server program, ASP program, etc. REST support in Apex Code is limited to a single "I send you data, you return a response" format expected of HTTP, unlike FTP which is often "what is your user name?" "i am john.doe" "what is your password?" "jane.doe" "what is your command?" "send somefile.txt" << other binary stuff happens here >>. So, you need a bridge (basically as how the link you posted explains it). The bridge is your responsibility. We can help you post to it, but you have to have a program running to accept the input and send the appropriate output, or all is for naught.