Dear All,
I want to add two attachment in notes using html and upload it using plugin but the attachment should have two separate upload buttons like this
*This post is locked for comments
Dear All,
I want to add two attachment in notes using html and upload it using plugin but the attachment should have two separate upload buttons like this
*This post is locked for comments
I'd add a couple of things:
- You can have only 1 attachment per note (because attachments is stored in the note.. it's just a field there)
- There is an awesome drag-drop example here:
You may not have to implement drag-drop, but that code may give you some ideas (most likely, if you want two buttons, you'll have to go for a web resource.. and, then, programmatically create two notes behind the scene)
Hi,
You should use "annotation (note)" entity in Dynamics CRM and attach (upload) file to this. Of course you need read your files with your code and get Base64 or ByteArray data to create annotation attachment. You can see details about annotation entity on https://msdn.microsoft.com/en-us/library/gg334398(v=crm.8).aspx and also find sample code to upload https://msdn.microsoft.com/en-us/library/gg328429.aspx
Other way, you can use my library called XrmLibrary that includes some helper methods to do SDK operations by easyway, sample codes below;
EntityReference entityReference = new EntityReference("your primary entity logical name", Guid.Parse("your record ID")); AttachmentData attachmentData = AttachmentHelper.CreateFromPath(@"your file path", "your file name"); //you can also use "CreateFromBase64", "CreateFromByte", "CreateFromStream" AnnotationHelper annotationHelper = new AnnotationHelper(organizationService); annotationHelper.Create(entityReference, "Your note subject", "your note text", attachmentData);
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156