annotation a = (annotation)service.Retrieve("annotation", new Guid("{56889D1A-6391-DC11-8017-000C2928380D}"), new AllColumns());
string myNote = "{56889D1A-6391-DC11-8017-000C2928380D}";
string url = "http://localhost:5555/Activities/Attachment/download.aspx?" + "AttachmentType=5&AttachmentId=" + myNote;
WebClient myWebClient = new WebClient();
myWebClient.Credentials = CredentialCache.DefaultCredentials;
myWebClient.DownloadFile(url,@"C:\CRM\" + a.filename );
Please note that you must change the Attachment Type according to the entity that owns the attachment:
- 1001 for ActivityMimeAttachment (like email attachments),
- 5 for Annotation (note's attachments) and
- 1070 for SalesLiteratureItem.
Hope that will help.
PS: This is not a Titan CRM post yet.