I found the answer by myself. I'll post it here so it maybe helps someone running into the same problem.
Each task has it's own ID (Guid) and as everybody knows, IDs are unique.
I guess the QlikView server is thinking something equal to this: "What the hell are you doing there? You can't copy/create triggers with an existing ID... I'll better delete the existing triggers with that ID"
So all what you see, is nothing... No error message anywhere.
As a workaround for this problem, here is the solution:
You need to generate a new ID for each existing trigger.
// Get all existing triggers from document
Trigger taskTrigger = documentTask.Triggering.Triggers;
// Generate a new ID for each trigger found
foreach (Trigger trigger in taskTrigger)
trigger.ID = new Guid();
Hope it helps someone.
Really interesting code, thanks!
Just one question: Have you tried to copy a task onto another source document but the destination document is located in a different publisher?
I'm trying to do this but at this moment I'm unable to do the copy. All the publishers are visible each other and I can do the copy using the remote management service but it must be done using the QMS API.
Thanks in advance!!