Copy List Item Attachment for archiving using SharePoint Designer 2013

hi,
how to Copy List Item Attachment for archiving using SharePoint Designer 2013

1. You can use access:
http://viziblr.com/news/2011/11/5/batch-exporting-sharepoint-2010-list-item-attachments-using.html
Or you can try below script
You can loop through each list item, and get each attachment.
List<SPAttachment> attachments = new List<SPAttachment>();
SPList list = SPContext.Current.Web.Lists["My List"];
foreach (SPListItem item in list.Items)
attachments.AddRange(item.Attachments.Cast<SPAttachment>());
If this helped you resolve your issue, please mark it Answered

Similar Messages

  • Issue with inserting edit item form using sharepoint designer 2013

    Hi,
    I inserted an edit form of a custom list in a site page using sharepoint designer-2013. But it is giving error "no item exists". 
    I am using default ListItemId Parameter with ID query string and I passed the query string parameter to that page. But still the result is same. But if I give any default value, page is displaying fine for that specific item although I dont pass any querystring
    to the page URL.
    Can you please guide me?
    Thanks in advance.
    Regards,
    Chaitanya

    Hi,
    From your description, I know you get issue when you add “edit form” of custom list to a page.
    I tried to reproduce your issue, and if I added “edit form” to page without “Advanced Mode”.
    I add “edit form” to page with steps below:
    Right click the page, click “Edit File in Advanced Mode”.
    Find source with keywords [ContentPlaceHolderId="PlaceHolderMain"].
    Choose INSERT tab in the Ribbon.
    Click “Edit Item Form”, and choose the custom list that you want to add.
    Save file, and go to the page.
    The screenshot below is my result:
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Send Edit Items URL in E-Mail Using Sharepoint Designer 2013 WorkFlow

    Hi,
    I want to Send the URL of Edit Item List using SharePoint Designer 2013 Workflow
    I m Using [%Task : URL%] Then it return the internal URL -- 
    http://SP2013/Sites/MySites/HelloSites/Lists/Tasks/DispForm.aspx?ID=359&ContentTypeId=0x0108003365C4474CAE8C42BCE396314E88E51F
    But i want in  AAP URL for edit list items  such as 
    http://Hello.com/Sites/MySites/HelloSites/Lists/Tasks/DispForm.aspx?ID=359&ContentTypeId=0x0108003365C4474CAE8C42BCE396314E88E51F
    Any one can suggest me please.
    Thanks 
    Rajesh

    Hi, 
    I'm assuming you made your site as internet site (public facing).
    In that case you might site desired output. If not you can think of replacing text
    i.e SP2013 = hello.com
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • Workflow created using sharepoint designer 2013 is not getting started and the initiator is Anonymous.

    Hi All,
    I have created a Site and List Workflow using SharePoint designer 2013, its a simple list workflow with one stage init on creating an item.
    When i verified the status of workflow its showing as initiator = Anonymous and Internal Status - Not started. Please a screen shot below
    Looking forward for your help.
    Thanks in Advance.
    Sunitha

    Below is the solution.
    Solution:.
    check
    list in workflow manager server  :
    1. Check https://[wfms]:12290 or http://[wfms]:12291 if they are responding 2. Check
    ”WorkflowMgmtPool” is started 3. Following services are running
    Workflow Manager Backend
    Service Bus Message Broker
    Service Bus Gateway
    Windows Fabric Host Service (FabricHostSvc)
    4. Get workflow farm information , workflow database  by  Start Workflow
    Manager PowerShell     get-WFfarm   5. Check if the Workflow Manager farm running(workflow service backend and  front end         should be rennin)  by  Start Workflow Manager
    PowerShell    get-WFfarmStatus
    6. Check oAut in accessible by http:// [wfms]:12291/$SYSTEM/$Metadata/json/1
    7. Restart the WorkflowServiceBackend service
    net stop WorkflowServiceBackend
    net start WorkflowServiceBackend
    Reference Link
    http://blogs.msdn.com/b/laleh/archive/2014/09/03/sharepoint-2013-workflow-troublehsooting.aspx
    Thanks all.
    Sunitha

  • How to Loop through another list and update a column with SharePoint Designer 2013 Workflow

    Hi,
    I am trying to get my head around the new 2013 Workflow Engine and SharePoint Designer 2013 Workflow Text-Based Designer.
    I have two lists.
    List A has 2 columns: Title, Completed (Yes/No)
    List B has 3 columns: Title, LookupListATitle, Completed (Yes/No)
    All the 2013 Workflow components have been installed and configured and I am selecting the 2013 Workflow option in SPD
    I am trying to set off a 2013 Workflow when an item in List A is edited to Loop through List B and select items where the LookupListATitle column's value is equal to the Title value of the current item, and set the value of the Completed column for those
    items in ListB to "Yes".
    I have the Workflow configured like this:
    Stage: Stage 1
    IF Current Item:Completed equals Yes
    Loop: 1
    The contents of this loop will run repeatedly while: ListB:LookupListATitle equals Current Item: Title
    Update item in ListB. 
    (The dialog options for the update item action as follows:
    List: ListB
    Field: Completed, Value: Yes
    In the Find the List Item section
    Field: LookupListATitle
    Value: Current Item: Title)
    Transition to stage
    Go to End of Workflow
    When I update an item in ListA and set its Completed column to Yes, I would expect the Workflow to find all the items in List B where the Lookup column is equal to ListA's Title (there are 2) and update their Completed column to Yes. But it doesn't work.
    When I look at the Workflow Status it says the Internal Status is "Canceled" and the information pop up has the following alien language (and may be truncated):
    RequestorId: 95f03b62-8956-ac14-c5cf-dc98c89c589c. Details: System.ArgumentException: Invalid JSON primitive: Item001. Parameter name: value at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ConvertStringToJsonNumber(String value) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ReadPrimitive(String
    type, XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(Stream jsonStream, Byte[] jsonBytes)
    at Microsoft.Activities.DynamicValue.ParseJson(String json) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
    executor, BookmarkManager bookmarkManager, Location resultLocation)
    Unfortunately I don't have access to the server, logs etc.
    I would love to find some tutorials, or any books on SharePoint Designer 2013 in general and Workflows in particular but my searches haven't turned up much so far apart from a pre-release Beginning SharePoint Workflows which is in its very early stages and
    not much help yet.
    Can anyone give me some guidance on how to set up While Loops to iterate through a related list using SharePoint Designer 2013?
    Mark

    Hi,
    I understand that you wanted to update the items in the other list (Participants) where the Course equals the Current Item.
    You need to use “Call HTTP Web Service" action and “Build Dictionary" action to get the Maxid and then loop Participants to update the items.
    You can follow the steps as below to achieve what you want:
    Create a custom list named Courses, add columns: Title(Single line of text), Course ID(Single line of text), Course Finalised (Yes/No).
    Create a custom list named Participants, add columns: Title(Single line of text), Course(Lookup), CourseFinalised (Yes/No).
    Create workflow associated to Courses, start the workflow automatically when an item is created or changed.
    Add conditions and actions:
    The HTTP URL is set to
    https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be order by Id and desc.
    Then if Course Finalised is equal to Yes, the CourseFinalised  of the associated items in Participants will be updated to Yes.
    More information:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Cannot see the Previous Versions using SharePoint Designer 2013 - Versions cannot be accessed at this time.

    I was trying to view the Version History of a page from the SharePoint Designer 2013, I got the following error. "Versions cannot be accessed at this time, because the server is busy. Please try again later.
    Whereas I can able to access the version history through browser, the issue only occurs in SharePoint Designer.
    Thanks
    Ramkumar

    Hi Ramkumar,
    I understand that when you use SharePoint designer 2013 to check previous version of a page, it will pop up the error window. This is a known issue and here are two feasible workaround:
    1.Use SharePoint designer 2010 to connect SharePoint 2013 site.
    2.In SharePoint Designer 2013, use the Versions pane in the Page Summary view to access detailed version information of a file. You can access the Page Summary view by:
    a.  (Left) Clicking on a filename in the Site Pages list.
    b. Select a file Site Pages list by clicking anywhere in the row (except the filename) and then clicking on “Page Settings” in the Site Pages.
    c. Restore the required version.
    Thanks for the understanding and support.
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    Hi,
    Based on your description, I have done a test and I can’t reproduce your issue.
    I have used SharePoint Designer 2013 to open a SharePoint Online site and there are no issues.
    I’d like to clarify whether you encounter any issues when accessing SharePoint Online sites. If there are no issues during the accessing procedure, SharePoint Online service should be working fine at your side. The issue may be caused by specific SharePoint
    Designer client or network. I suggest you refer to the following steps to troubleshoot the issue.
    1. Use SharePoint Designer to open another site and check whether it is successful.
    2. When you are prompted to enter Office 365 account and password, try other users’ accounts and select the remembering the credential.
    3. Perform the connection procedure under another environment and verify whether the issue is resolved.
    If the issue persists, can you provide related screenshots for further troubleshooting?
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • How to create / edit a website using SharePoint Designer 2013

    How to EDIT a website created by Frontpage using SharePoint Designer 2013 ?
    How to CREATE a new website using SharePoint Designer 2013 ?

    You can edit any sharepoint site using designer not any other site.
    To create a new website using designer follow below:
    To create a new site, click the File tab, choose Sites, and perform one of the following:
    Click New Blank Web Site to create a blank, empty SharePoint site.
    Click Add Subsite to My Site to create a new site under your My Site.
    Under Site Templates select a template to create a new site based on a SharePoint template.
    http://office.microsoft.com/en-in/sharepoint-designer-help/get-started-with-sharepoint-designer-2010-HA010370548.aspx#BMopensites

  • How to Copy list item attachment to document library in SharePoint 2010

    Hi,
    How to Create a folder ("List Item - Title Name") in Document library and copy list items Attachments to the same folder in SharePoint 2010,thanks in advance.
    Regards,
    Selvan.J
    Selvan J

    Hi,
    You should first check whether the folder exists in the library, if the folder not exists, then create it.
    I had modified the code, you can use the following code snippet to achieve it.
    private void EventCopyFileWhenItemCreatedOrUpdated(SPItemEventProperties properties)
    SPSite site = new SPSite(http://YourSiteName);
    SPWeb web = site.OpenWeb();
    SPList doclibList=properties.Web.Lists["YourLibName"];
    bool foundFolder = false;
    if (doclibList.Folders.Count>0)
    foreach (SPListItem fitem in doclibList.Folders)
    if (fitem.Title.Equals("FolderA"))
    foundFolder = true;
    break;
    if (foundFolder == false)
    SPListItem folder = doclibList.Folders.Add(doclibList.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder,"FolderA");
    folder.Update();
    string fUrl = doclibList.RootFolder.ServerRelativeUrl+"/FolderA";
    SPFolder myLibrary = web.GetFolder(fUrl);
    if (properties.ListTitle == "YourListName")
    SPListItem sourceItem = properties.ListItem;
    properties.Web.AllowUnsafeUpdates = true;
    //get the folder with the attachments for the source item
    SPFolder sourceItemAttachmentsFolder =
    sourceItem.Web.Folders["Lists"].SubFolders[sourceItem.ParentList.Title].SubFolders["Attachments"].SubFolders[sourceItem.ID.ToString()];
    //Loop over the attachments, and add them to the target item
    foreach (SPFile file in sourceItemAttachmentsFolder.Files)
    if (CheckFileNameExist(file.Name , properties) == false)
    byte[] binFile = file.OpenBinary();
    myLibrary.Files.Add(System.IO.Path.GetFileName(file.Url) , binFile);
    private bool CheckFileNameExist(string fileNameInFileAttach, SPItemEventProperties properties)
    bool flag = false;
    SPList myDocumentLib = properties.Web.Lists["YourLibName"];
    SPQuery spQuery = new SPQuery();
    SPListItemCollection items = myDocumentLib.GetItems(spQuery);
    foreach (SPListItem item in items)
    if (fileNameInFileAttach == item["Name"].ToString())
    flag = true;
    break;
    return flag;
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Item level permission on workflow task List using sharepoint designer 2013

    Hello All,
    I have created a custom approval workflow. Workflow create a Task in Tasks List.  Now suppose A task is assign to user1. 
    User2 should not able to edit\approve\reject the item.
    How to give item level permission using SharePoint designer in SharePoint 2013 workflow.
    SharePoint 2013 workflow doesn't have impersonation steps also.
    Please suggest how to give permission on task list based on assigned To field.

    In order to change permissions on a list item you'd need a sharepoint 2010 workflow according to http://msdn.microsoft.com/en-us/library/jj728659.aspx
    Unfortunately this functionality is not available in SharePoint 2013 workflows :-(
    The impersonation step still exists, but it is now called "App Step" in the SharePoint Designer 2013 Ribbon. This step is disabled, though, until you activate a web site feature called "Workflows can use app permissions"

  • Create Custom list form and validate fields using sharepoint designer 2010

    Hi All,
    I have a requirement to create a custom job application form which will be filled and submitted by anonymous users. I have a an option to create custom user control web part but I wanted to
    create it using custom list form using SharePoint designer. My requirement is below
    Date of birth (user age should be above 22yrs )
    Email Validation
    Phone validation
    Resume attachment (should attach only word documents or PDF)
    Qualification (If other is selected then show textbox else hide)
    Can above validations be done using SharePoint designer (JavaScript or validation controls)? Or do I have to create custom control web part?
    MercuryMan

    Hello,
    I think jquery/javascript can be used to put validations on those fields. Fortunately some of validation can be done via sharepoint itself like: email, phone, age. For Attachment and Qualification fields use jquery/JS.
    See below link for column validations:
    http://thechriskent.com/2012/08/15/validate-phone-number-columns-in-sharepoint/
    http://sharepointsolutions.com/sharepoint-help/blog/2011/12/how-to-validate-an-email-address-using-column-validation-in-sharepoint-2010/
    See this for attachment:
    http://stackoverflow.com/questions/4234589/validation-of-file-extension-before-uploading-file
    For qualification:
    http://sharepoint.stackexchange.com/questions/88064/hide-show-field-on-list-form-based-on-value-from-another-field
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How do I apply conditional formatting using SharePoint Designer 2013?

    I'm attempting to apply Conditional Formatting to a list view web part via SharePoint Designer 2013, and I can't seem to find the option to do so.
    I've a horrible feeling I'm just being daft, but here's what I've done so far:
    - Created a new page (I've tried both web part and wiki)
    - Added a list "App part" and saved the page
    - Checked-out and opened the page via Designer
    - Clicked the "Edit file" option
    - Selected the XsltListViewWebPart tag
    So far I can't find any options to add it. If I open the Conditional Formatting pane via the View menu it tells me the following:
    > To use conditional formatting, select an HTML tag, data value, or
    > range of text, and then click Create to specify formatting options.
    I've tried selecting the web part tags in all manner of combinations with no luck. In previous version I would have simply selected the previewed data rows in the now-absent Preview pane.
    Am I missing something?

    Create and edit a Wiki Page
    Click Inset > Data View and Select “Empty Data View”
    Click Inside the <DataSources> tags </DataSources>
    Click Insert > Data Source “Your Data Source Name”
    Hold down Ctrl button and select the Rows in the order you want them to appear from your “Data Source Details” Window.
    After the Rows are selected click on the drop down “Insert Selected Fields as…” at the top of the “Data Source Details” Window. 
    Select “Multiple Item View” option (This will create the xsl where we need to add the conditional formatting to)
    Find the <tr> tag that contains the Row Data.  Insert the following right below the <tr> tag:
    <xsl:attribute name="style">
    <xsl:if test="@FieldName = 'Something'">background-color: #FF0000;</xsl:if>
    </xsl:attribute>
    I hope this helps.  I figured this out by using the old 2010 Designer to figure out the where to place the code and how to do this.

  • Need to use sharepoint designer 2013 or use Infopath 2013 directly

    I created a custom list on a test Sharepoint 2013  website. My intent is to edit this custom list in Infopath 2013 so I can make custom modifications to the form. I am trying to determine if there is a point of placing the custom list in SharePoint
    Designer 2013 before I place the custom list in Infopath 2013 so I can create a custom form.
    when I run the custom list from the test Sharepoint 2013 website, there are a default 'save' and 'cancel' buttons. However when I access the custom list next in sharepoint designer 2013, there are the original 'save' and 'cancel' buttons on the top of the
    form and there are the 'save' and 'cancel' buttons at the bottom of the form.
    Thus can you tell me if there is a reason to place the custom list in sharepoint designer 2013 and what the reason is? Do I need the default forms of displayform, editform, and updateform?  If so, I only want one set of 'cancel/save' buttons on the
    form. Thus can you tell me how to keep only one set of save and cancel buttons to be displayed on the form?
    If I do not need SharePoint designer 2013, should I just go head and create the form needed in Infopath 2013?

    Hi Wendy,
    Based on you description, my understanding is that you want to custom your list form, and you want to keep only one set of 'cancel/save' buttons on the form.
    It is by default that there will be two set of 'cancel/save' buttons on the form after changing Form with SharePoint Designer.
    I suggest you custom your list form with InfoPath.
    Although it is by default that “Save” and “Cancel” Buttons disappeared after changing Form with InfoPath.
    You can Create Submit Button in an InfoPath Form .
    http://community.office365.com/en-us/b/office_365_community_blog/archive/2013/05/21/infopath-save-and-new-button-grid-user-post.aspx
    You can Create cancel Button in an InfoPath Form. Adding a button with a rule of closing the form when clicking.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have
    feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • Can't Get Item using SharePoint Designer 2013 REST Call Across Sites

    Hi all,
    I am using the following instructions, but can't get data outputted. I am keeping it basic for testing purposes and logging to the workflow history, but I am unable to pull the title. Any clues?
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thanks,
    Kelly
    Personal Blog: http://thebitsthatbyte.com

    Solved using this:
    http://msdn.microsoft.com/en-us/library/office/jj822159.aspx
    The key was to enable the feature within site settings and to trust the Workflow in Site A via configuring the trust in Site B (Site B is basically stating "I trust the workflow in Site A"). It also required an App Step to be inserted.
    Personal Blog: http://thebitsthatbyte.com

  • Cannot send email using SharePoint designer 2013 workflow

    I am having a problem which I see many others have also posted about.  However, I don't find that any of their solutions fixes my problem.
    Using SharePoint 2013 on Windows 2008 R2 server.  SQL 2008 R2 on separate server.  Created a pretty simple workflow that calls for an email to be sent.  Created an Infopath form that is published to a SharePoint list.  One of the
    list fields is called "Approver" and is a people lookup field.  The workflow assigns an approver based on certain criteria in the list, and then sends an email to the assigned approver.
    During the testing phase of creating the workflow, I had the email sent to me specifically and I received the emails with no problems.  When I change the email recipient to Current Item:Approver (who is also me), I don't receive the email.  I have
    tried selecting Display Name, Email Address, and Login Name, but none work.  I also tried to send the email to the current item:creator (which was me) by selecting "User who created current item" from the select users dialog.  This also
    doesn't work.  The workflow is shown in a suspended state in the Workflow status screen.
    For informational purposes, I also included the Approver Display Name, the Approver Email Address and the Approver Login Name in the body of the email so that I could see what those fields actually returned as data.  The display name, and email address
    are correct, but the login name returned i:0#.w|domain\login (domain and login were my actual domain and login name).
    I have tried several of the fixes I found online to resolve this, but none have worked. Any help is appreciated.

    I don't see that it is possible to add CurrentItem:Creator to a list view.  The CurrentItem:CreatedBy returns my name as it should.  However, this does not help with my problem.  I don't want the email to come to me.  I want it to go
    to the CurrentItem:Approver.  This is a specific person who is assigned by the workflow based on various fields in the current item.  The approver is assigned, then an email is sent to the assigned person.
    There is a SharePoint group set up for Approvers.  This is used to assign permissions to the site where this list is created.
    Basically, I can't send an email to any recipient where I am using the current item lookup fields to populate the To: field.  I can only send email if I specifically select a person by name.

Maybe you are looking for

  • SMTP accounts offline.  Can not get them online!

    Using Mail 4.6.  Several of my SMTP accounts are marked as "offline" and the the menu choices for changing accounts to online are greyed out.  This is only interfering with sending mail from a single Gmail account, and I have checked the settings and

  • URGENT: SKYPE Deleting my contacts randomly

    As i add contacts or they add me... either one of us accepts.. and for either a brief moment they are contacts then suddenly no longer... or... they are deleted from my contact list days or a week after... i readd them... and they readd me.. and then

  • Enabling and disabling input filed based on the Dropdown values selection

    HI, I have a requirement with Adobe Interactive forms being called from HCM Forms & Processes. We have a drop-down list and a inputbox. based on the values selected from the drop-downlist, the input box should be visible and hidden. If the input valu

  • Draw line between black pixel : coordinates of selected pixels ?

    Hi I want to build a script which can check a Photoshop file and : - find black pixel - for each black pixel, look for another black pixel within maximum distance of 5 pixels - then draw a line between the two black pixels. I wrote this script below

  • Time Machine won't backup... because there's too much free space??

    Hi all, I'm getting a strange error from Time Machine: "*Time Machine Error* This backup is too large for the backup volume. The backup requires 147.8 MB but only 506.8 MB are available. To select a larger volume, or make the backup smaller by exclud