Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Download attachments from CRM using c#

$
0
0

I am able to download the file from CRM using c# using below code

using (FileStream fileStream = new FileStream(fileName, FileMode.OpenOrCreate))

                        {

                            byte[] fileContent = Convert.FromBase64String(content);                      

                         

                            fileStream.Write(fileContent, 0, fileContent.Length);

                        }

But when i open the downloaded file i am able to see text in byte format instead of actual text..

Tried multiple possible ways..

Please let me know if it worked for any one and please paste code as well.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>