Tag Info

Hot answers tagged

11

Document Set is an option. I had also used LinkToDocument as it can link to master document. You can also create a unique column (or field) so these can grouped together.


8

What you are doing is something like this: ItemUpdating (attachItem.Update()) [internal]SPListItem.Update() Which causes the internal Update to fail because you have already done it. Try putting your code in ItemUpdated, rather than ItemUpdating. The flow is then ItemUpdating [internal]SPListItem.Update() ItemUpdated (attachItem.Update())


7

It's not weird, it's by design. Attachments limit size is (if I remember correctly) also limited by the <httpRuntime maxRequestLength="size"/> element in web.config. Check that.


5

Wouldn't you just post a link to the item instead of attach it. I don't know all your requirements, but it seems that that would be a better solution, not only because it is supported OOB, but because it limits overhead with multiple instances of the same file existing in multiple places.


5

Got it worked !! Used an anchor control with Image instead of Image Button!! <a href="" runat="server" id="aAttachmentURL11" target="_blank"> <img src="~/_layouts/images/ipw/PowerPoint-64.png" alt="" style="border: 0px" width="63px" /> </a> Code : And then called the method getlist(string Title) to return the ...


4

I think this forum post on MSDN might be of some help: Add attachment column to copy of NewForm.aspx in sharepoint designer For your scenario, I think you can try to create a custom list form (create custom list form), and then you can use SharePoint control “Form Action Button” instead of the default “Ok” button in the custom list form: ...


4

You can use DisableAttachments="TRUE" on the top of Schema.xml and you should be good to go: For e.g. <List Title="Test List" Description="Test desc" Direction="0" BaseType="0" Url="Lists/TestList" DisableAttachments="TRUE" FolderCreation="FALSE" Version="8" Type="100" xmlns="http://schemas.microsoft.com/sharepoint/">


4

I had the same problem before. The thing is that sharepoint creates the folder when you add your first attachment, not on creating the item. In other words, the folder you are trying to upload to does not exist. You can create this folder by either adding a dummy-file and removing it in an ItemAdding EventReceiver when you create the item. Another ...


4

You can construct the attachment URL by using the SPAttachmentCollection.UrlPrefix property of the attachments collection. For example: string attachmentUrl = item.Attachments.UrlPrefix + item.Attachments[0];


3

I know this is an old thread, but there are free codeplex solutions that will do what you are asking. http://SharePointStuff.Codeplex.com adds a new activity to SharePoint Designer that allows you to send an email with an attachment. If used on a list item it will send any documents attached to the item or if used on a document library it will send the ...


3

Just a side note. <httpRuntime maxRequestLength="" /> does not work for IIS 7. It has a new setting under system.webServer. See this blog for a reference: http://weblogs.asp.net/jeffwids/archive/2009/09/24/from-iis6-maxrequestlength-to-iis7-maxallowedcontentlengthfile-specifying-maximum-file-upload-size.aspx


3

Okay, so after some debugging I found the problem and, even better, the solution. The OK button on the attach form runs a script called OKAttach(), which features a line towards the end that reads: document.getElementById("idAttachmentsRow").style.display=""; All well and good, except that at some point SharePoint sneaked behind your back and did this to ...


3

If you don't want to go down the document set approach, you could create a lookup column to either a Supporting Files document library or the current document library itself that allows for multiple selections. This would allow you to add additional related documents to the metadata for the "Main" document.


3

You can map a drive to the List: http://community.office365.com/en-us/forums/154/t/5216.aspx The attachments will be under the Attachments folder.


3

You can add this script: <script type="text/javascript" language="javascript"> function PreSaveAction() { var elm = document.getElementById("idAttachmentsTable"); if (elm == null || elm.rows.length == 0) { document.getElementById("idAttachmentsRow").style.display='none'; alert("Please attach Documents"); return ...


3

Use SP.ListItem.attachmentFiles to retrieve the collection of attachments that are associated with the list item. How to retrieve list items with attachments using JSOM function getListItems(listTitle,success,error) { var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getByTitle(listTitle); var items ...


3

Since you don't need to use the SPServices library, you can accomplish this via REST and the moveTo() method. The following should work: var url = "/_api/Web/Lists/getByTitle('My List Name')/Items", qs = "?$filter=Attachments eq 1&$select=ID,Author/Title,*&$expand=Author"; $.ajax( { url : siteUrl + url + qs, type : 'GET', headers : { ...


2

I had a glance in the AttachmentsField.UpdateFieldValueInItem call to see where it gets the list of files from for its own use. It appears to use this property: AttachmentsField.Context.Request.Files, the documentation for which is here: HttpRequest.Files Edit: I suddenly realised that you may be trying to access the control in order to save the ...


2

Looking at a custom EditForm.aspx page in Sharepoint Designer, the form code looks like this: <tr id="idAttachmentsRow"> <td nowrap="true" valign="top" class="ms-formlabel" width="20%"> <SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%"> ...


2

Maybe you can consider alternative approach for your solution. You can add additional library designated for storing exe files. Then you can establish link between list and library by using additional url field on list to store direct link to exe in library (if you only have one-to-one relations) or you can use lookup field in library to establish ...


2

As do Nintex and K2 if you're looking for other robust features.


2

Think you'll need a third party Workflow Activity to do this. Luckily, there's a pack on Codeplex which offers this: http://spdactivities.codeplex.com/


2

You would need to mail-enable to the list so that it was able to receive email. You will then make sure that AD is able to recognize that list's email address as a valid mail recipient. Then add that email address as a recipient of jithu@abc.com. I am not sure about handling the attachment though. http://technet.microsoft.com/en-us/library/cc262947.aspx


2

By reading your question, I would solve your problem by creating one document library. Name it for example "Attachements". Then add multiple lookup columns in the first list to this new created "Attachements" document library. Important is to set "Select multiple values" Then the users just needs to add the files to the document library and then create/edit ...


2

Assuming you're working in server side code: Take a look a the Attachments property of the SPListItem, it returns an SPAttachmentCollection, from there itterate the SPFiles and use the Url property to get the site relative path and you should be sorted from there. Some times the docs on MSDN are actually quite helpful :)


2

No, it is not possible - you will have to store (add/remove) the attachements in a different document library. You'll have to do the adding/removing yourself - either with custom code (in your InfoPath Form or better in a custom WebService) or OOTB WebServices. Here is a good article about the Top 10 Questions about InfoPath File Attachements. See Point ...


2

Well, this is not the answer but also a little heavy for a comment... Don't want to change your requirement? If to upload files to sharepoint library then it also has hard limit (2 GB) and by default 50 MB which can be changed from Sharepoint side The problem is that Sharepoint stores them in content MSSQL database under the hood. I do not beleive that it ...


2

You can use AjaxFileUpload. Have a look at the demo on below link. http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx


2

This cannot be done out of the box. But there is a solution on Codeplex that adds a custom workflow activity. This activity allows you to attach files that are either attachments in a list or documents in a library. http://sharepointstuff.codeplex.com/


2

REST (with jQuery.ajax): $.ajax({ url: "/_api/lists/getByTitle('Test')/getItemById(1)/AttachmentFiles/getByFileName('test.txt')", method: 'DELETE', headers: { 'X-RequestDigest': $('#__REQUESTDIGEST').val() } }); You can see the REST API endpoints at http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx . And you can see ...



Only top voted, non community-wiki answers of a minimum length are eligible