Hi there,
From what I can see, we should be able to modify CreateDate and ModifyDate properties on a node through web services but I can’t get it to stick.
I’ve modified the sample to test this as follows:
newDoc = docManClient.CreateDocument(ref otAuth, parentID, fileInfo.Name, "Initial Comment", false, metadata, attachment);
Console.WriteLine(" Created: CreateDate: {0}, Comment: {1}", newDoc.CreateDate, newDoc.Comment);
newDoc.CreateDate = fileInfo.CreationTime;
newDoc.Comment = "Modified Comment";
docManClient.UpdateNode(ref otAuth, newDoc);
Console.WriteLine("Modified: CreateDate: {0}, Comment: {1}", newDoc.CreateDate, newDoc.Comment);
int tempID = newDoc.ID;
newDoc = null;
newDoc = docManClient.GetNode(ref otAuth, tempID);
Console.WriteLine("Reopened: CreateDate: {0}, Comment: {1}", newDoc.CreateDate, newDoc.Comment);
and here’s what I get:
Created: CreateDate: 4/8/2014 2:42:51 PM, Comment: Initial Comment
Modified: CreateDate: 9/24/2013 12:33:12 PM, Comment: Modified Comment
Reopened: CreateDate: 4/8/2014 2:42:51 PM, Comment: Modified Comment
So I can see that the node is being updated by the change to the Comment. But even though it’s accepted the changed CreateDate, the UpdateNode is not committing that change. The same happens for ModifyDate.
Is this a bug? Working as designed? Am I doing something wrong or is there a workaround?
Thanks
Rob