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
DowithforceDowithforce 

Createing CSV problem

Hello All,

 

 

I am calling remote server file and write a logic on remote and get response back to Salesforce

using, set content type Content-Type as application/vnd.ms-excel as follows

 

 

function cratecsv()
{
sforce.connection.remoteFunction( {
url :'http://xxxxxxxx',
requestHeaders: {"Content-Type":"application/vnd.ms-excel"},
method: "POST",
requestData: "para=csv",
cache : true,
async: true,
onFailure : function(response) { alert(response); },
onSuccess : function(response) { alert('Success'); alert(response); }
});

 

But I am not getting standard popup to save file as csv/xls, it showing string comma seprated as a response but csv not genrated.

 

I also tried by creating CSV file on remote server and removed content-type from above function, still mot working.

 

Please help me out.

 

Thanks

Message Edited by Dowithforce on 07-29-2009 04:28 AM
DevAngelDevAngel

You will need to set the mime type of the repsonse from your remote server.

 

 

DowithforceDowithforce
Thanks!