Hi All,
Simple question (hopefully) Is it possible to output a CSV file in Dynamics CRM Online using JavaScript?
The purpose is to retrieve data from the quote form and output it as a CSV file, I already getting the data needed. But now I'm just stuck on wherever or not I can actually output a file. I've done some digging around online and found there is a chance it would work however upon trying some it did not work.
Here is an example of one that did not work and have error 'Object doesn't support property or method 'join''
var data=[customerId.Name,description,effectiveFrom]
var csvContent = "data:text/csv;charset=utf-8,";
data.forEach(function(infoArray, index){
dataString = infoArray.join(",");
csvContent += index < data.length ? dataString+ "\n" : dataString;
});
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.csv");
document.body.appendChild(link); // Required for FF
alert("Complete export to CSV");
link.click(); // This will download the data file named "my_data.csv".
Hopefully someone can help me.
*This post is locked for comments
I have the same question (0)