<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: File Attachment to Notes &#8211; Dynamics CRM 4.0</title>
	<atom:link href="http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/feed/" rel="self" type="application/rss+xml" />
	<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/</link>
	<description>Microsoft CRM Blog</description>
	<lastBuildDate>Fri, 30 Oct 2009 14:19:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ayaz Ahmad [MVP - MSCRM]</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5269</link>
		<dc:creator>Ayaz Ahmad [MVP - MSCRM]</dc:creator>
		<pubDate>Mon, 19 Oct 2009 05:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5269</guid>
		<description>Use following code to upload file to an annotation.

//#1
FileInfo pointer = new FileInfo( &quot;c:/test.pdf&quot;);
FileStream fileStream = pointer.OpenRead();
byte[] byteData = new byte[(int)fileStream.Length]; 
fileStream.Read(byteData, 0, (int)fileStream.Length); 
string encodedData = System.Convert.ToBase64String(byteData);

//#2
fileStream.Flush(); 
fileStream.Close();

//#3
UploadFromBase64DataAnnotationRequest upload = 
            new UploadFromBase64DataAnnotationRequest();
upload.AnnotationId = newNoteID;
upload.FileName = &quot;test.pdf&quot;;

//#4
upload.MimeType = &quot;application/pdf&quot;;

//#5
upload.Base64Data = encodedData;

//#6
UploadFromBase64DataAnnotationResponse uploaded = 
   (UploadFromBase64DataAnnotationResponse)myCRMService.Execute(upload);</description>
		<content:encoded><![CDATA[<p>Use following code to upload file to an annotation.</p>
<p>//#1<br />
FileInfo pointer = new FileInfo( &#8220;c:/test.pdf&#8221;);<br />
FileStream fileStream = pointer.OpenRead();<br />
byte[] byteData = new byte[(int)fileStream.Length];<br />
fileStream.Read(byteData, 0, (int)fileStream.Length);<br />
string encodedData = System.Convert.ToBase64String(byteData);</p>
<p>//#2<br />
fileStream.Flush();<br />
fileStream.Close();</p>
<p>//#3<br />
UploadFromBase64DataAnnotationRequest upload =<br />
            new UploadFromBase64DataAnnotationRequest();<br />
upload.AnnotationId = newNoteID;<br />
upload.FileName = &#8220;test.pdf&#8221;;</p>
<p>//#4<br />
upload.MimeType = &#8220;application/pdf&#8221;;</p>
<p>//#5<br />
upload.Base64Data = encodedData;</p>
<p>//#6<br />
UploadFromBase64DataAnnotationResponse uploaded =<br />
   (UploadFromBase64DataAnnotationResponse)myCRMService.Execute(upload);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miguel</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5255</link>
		<dc:creator>Miguel</dc:creator>
		<pubDate>Fri, 25 Sep 2009 11:00:54 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5255</guid>
		<description>Hi,

I want to get the file associated with a note in CRM 3.0.
I know how to get the note, the file name, but not the file contents.

How do I do this?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to get the file associated with a note in CRM 3.0.<br />
I know how to get the note, the file name, but not the file contents.</p>
<p>How do I do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sander</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5248</link>
		<dc:creator>sander</dc:creator>
		<pubDate>Fri, 21 Aug 2009 12:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5248</guid>
		<description>Thank you for your article!</description>
		<content:encoded><![CDATA[<p>Thank you for your article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ismail</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5238</link>
		<dc:creator>Ismail</dc:creator>
		<pubDate>Fri, 07 Aug 2009 12:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5238</guid>
		<description>Hi, 

I working on small project of integrating with CRM.Basically just creating a Letter activity with doc attachment to Note. Your example will definitely help me. Just wondering if you a complete example. Also I have been struggling with setting Owner for the activity object. 
Please help me, I am very newbie to CRM customisation. 

Regards,
Ismail Mogal</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I working on small project of integrating with CRM.Basically just creating a Letter activity with doc attachment to Note. Your example will definitely help me. Just wondering if you a complete example. Also I have been struggling with setting Owner for the activity object.<br />
Please help me, I am very newbie to CRM customisation. </p>
<p>Regards,<br />
Ismail Mogal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ayaz Ahmad [MVP - MSCRM]</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5175</link>
		<dc:creator>Ayaz Ahmad [MVP - MSCRM]</dc:creator>
		<pubDate>Thu, 28 May 2009 21:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5175</guid>
		<description>You need to look at OpenXML that mcirosoft use to play with office 2007 file. Also look at 

http://ayazahmad.wordpress.com/2007/08/23/generate-excel-2007-sheets-from-mscrm-data-%e2%80%93-openxml-show/

It may help you.</description>
		<content:encoded><![CDATA[<p>You need to look at OpenXML that mcirosoft use to play with office 2007 file. Also look at </p>
<p><a href="http://ayazahmad.wordpress.com/2007/08/23/generate-excel-2007-sheets-from-mscrm-data-%e2%80%93-openxml-show/" rel="nofollow">http://ayazahmad.wordpress.com/2007/08/23/generate-excel-2007-sheets-from-mscrm-data-%e2%80%93-openxml-show/</a></p>
<p>It may help you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soren hansen</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5174</link>
		<dc:creator>soren hansen</dc:creator>
		<pubDate>Thu, 28 May 2009 08:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5174</guid>
		<description>Another issue...

I have attatched an xlsx document in CRM 4.0, and it has been created in tabel: annotation.
Now i would like to make use of  this annotation in my code. Need to access a sheet within this file and use the data to update other entities i CRM.

I have retrievde the annotation by the objectid.
and  decoded the content of documentbody (a string)   using Convert.FromBase64String,  and have now a byte-array.
My question is what to do next, in order to re-create the xlsx file in-memory ? 
Any suggestions ?</description>
		<content:encoded><![CDATA[<p>Another issue&#8230;</p>
<p>I have attatched an xlsx document in CRM 4.0, and it has been created in tabel: annotation.<br />
Now i would like to make use of  this annotation in my code. Need to access a sheet within this file and use the data to update other entities i CRM.</p>
<p>I have retrievde the annotation by the objectid.<br />
and  decoded the content of documentbody (a string)   using Convert.FromBase64String,  and have now a byte-array.<br />
My question is what to do next, in order to re-create the xlsx file in-memory ?<br />
Any suggestions ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ayaz Ahmad [MVP - MSCRM]</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5173</link>
		<dc:creator>Ayaz Ahmad [MVP - MSCRM]</dc:creator>
		<pubDate>Wed, 27 May 2009 22:13:11 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5173</guid>
		<description>Its very much possible using unsupported ways. People have developed custom controls for CRM. just google. 

Just thinking how can you achieve this. You can even introduce your own tab on the form as Notes and then add iframe and aspx page to enter/read text using rich text box. when submit simply add this text as note to the entity using CRM sdk. So there are endless possibilities. But if you are desinging a complex solution or vertical, i recommend to use supported ways as upgrade will cost a lot in case of unsupported customization.</description>
		<content:encoded><![CDATA[<p>Its very much possible using unsupported ways. People have developed custom controls for CRM. just google. </p>
<p>Just thinking how can you achieve this. You can even introduce your own tab on the form as Notes and then add iframe and aspx page to enter/read text using rich text box. when submit simply add this text as note to the entity using CRM sdk. So there are endless possibilities. But if you are desinging a complex solution or vertical, i recommend to use supported ways as upgrade will cost a lot in case of unsupported customization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaka</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5172</link>
		<dc:creator>Jaka</dc:creator>
		<pubDate>Wed, 27 May 2009 21:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5172</guid>
		<description>Thanks. But do you know anyone (or ISV) that have developed this stuff? Do you think it&#039;s even possible?
Thanks.</description>
		<content:encoded><![CDATA[<p>Thanks. But do you know anyone (or ISV) that have developed this stuff? Do you think it&#8217;s even possible?<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ayaz Ahmad [MVP - MSCRM]</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5171</link>
		<dc:creator>Ayaz Ahmad [MVP - MSCRM]</dc:creator>
		<pubDate>Wed, 27 May 2009 20:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5171</guid>
		<description>Hi Jaka,
Its not possible out of the box.</description>
		<content:encoded><![CDATA[<p>Hi Jaka,<br />
Its not possible out of the box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaka</title>
		<link>http://ayazahmad.wordpress.com/2008/06/11/file-attachment-to-notes-dynamics-crm-40/#comment-5170</link>
		<dc:creator>Jaka</dc:creator>
		<pubDate>Wed, 27 May 2009 14:08:15 +0000</pubDate>
		<guid isPermaLink="false">http://ayazahmad.wordpress.com/?p=81#comment-5170</guid>
		<description>Hi Ayaz,
Do you know if it&#039;s possible to have a rich text format on Note section? Can we create our own field type and assign the new type to any entity?
Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi Ayaz,<br />
Do you know if it&#8217;s possible to have a rich text format on Note section? Can we create our own field type and assign the new type to any entity?<br />
Thanks in advance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
