Created
July 10, 2012 14:46
-
-
Save kyleondata/3083739 to your computer and use it in GitHub Desktop.
C# code fore returning a file from CRM 2011
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var id = new Guid(Request["id"]); | |
Repository.DocumentRepository documents = new Repository.DocumentRepository(); | |
var results = documents.GetDocumentItem(id); | |
var f = File(Convert.FromBase64String(results.DocumentBody), Request["type"], results.FileName); | |
return f; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment