cancel
Showing results for 
Search instead for 
Did you mean: 

Copy folder issue / understanding

Lregnault_
Champ in-the-making
Champ in-the-making

Hi everyone, I'am actually implementing a Listener wich wait the event: CreatedByCopy, then I add the relations I wanted in the destination document. It's working well when using it on a simple document, but when a copy a entire folder wich contain some documents I can't see how the documents are added into the copyed folder. I was believed that the CreatedByCopy w'll be recurcisvly call in order to copy the documents. I believe I was wrong since my listener only see 1 CreatedByCopy event when I copy a folder.

If someone could give me some tips on how the folder copy is working, I got trouble to figure this out with the code. I actualy saw a method wich copy a List of document but I can't see where it's used.

I hope my english is understandable, thanks for reading.

LR

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

The event documentCreatedByCopy is sent only for the root of the copy. It cannot be sent for each of the copied documents as it could mean thousands of events for big hierarchies.

So in your code you have to take the copied document and recurse in its (newly created) children to do whatever you need.

View answer in original post

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

The event documentCreatedByCopy is sent only for the root of the copy. It cannot be sent for each of the copied documents as it could mean thousands of events for big hierarchies.

So in your code you have to take the copied document and recurse in its (newly created) children to do whatever you need.

Lregnault_
Champ in-the-making
Champ in-the-making

Thanks for your time, it's what I had actualy implements this morning.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.