The following code allows you to upload a single file with notes.
string entitytype_attachment = "incident";
Entity Note_attachment = new Entity("annotation");
Note_attachment["objectid"] = new Microsoft.Xrm.Sdk.EntityReference(entitytype_attachment, IncidentGuid);
Note_attachment["filename"] = "testFileName.txt"
Note_attachment["isdocument"] = true;
Note_attachment["documentbody"] = "TU0gVGV4dCBGaWxl";
svc.Create(Note_attachment);
Could you please tell me how to attach multiple files with a note using the existing code.?
Annotation only supports a single Attachment. If you want to have multiple attachments, you need to create a new Annotation record for each attachment.