Save Attachments from Parent to Child Item

Home Forums SPJS-Lookup Save Attachments from Parent to Child Item

Viewing 3 reply threads
  • Author
    Posts
    • #22068
      Sarah
      Participant

        Hi there,

        I have a requirement to copy/save Attachments from a Parent Item to new Child Items. IS there a way to achieve this at all? Client has several layers of Parent/Child items and would like to have attachments to be carried over to Child Items to avoid looking into each vLookup section to check where a particular Attachment is.

      • #22107
        Alexander Bautz
        Keymaster

          Hi,
          There is no built in support for this in vLookup. I guess it would be better to use some custom code in the child item to show the attachments from the parent by running a query to the parent item to find the attachments and link to them directly. This way you don’t need to duplicate the attachments in the children.

          Let me know if you want me to create a sample code snippet.

          Alexander

        • #22201
          Sarah
          Participant

            Hi Alexander,

            Thanks for your reply.
            Yes please if you don’t mind would be great to get a sample code for your approach.
            Thanks

          • #22235
            Alexander Bautz
            Keymaster
          Viewing 3 reply threads
          • You must be logged in to reply to this topic.