Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Change create date for the documents...
Sandor_Nemeth_(eu0013907_-_(deleted))
Hi,Is it somehow possible to change the default create date for an added document.When a document is inserted into LL, the system date is assigned as modified, and create date. I would like to have as created date the original date from the document, the document system date.It works so with the normal windows copy.Thanks,Tibor
Find more posts tagged with
Comments
Knowledge_Administration_(paclif02kmadmin_-_(delet
We don't really have any developer resources. Any configuration tricks would be greatly appreciated.
Alex_Kowalenko_(x-eu0016039_-_(deleted))
Standard Livelink has no options to configure the create date for documents. As a custmization you could register a NodeCallback for subtype 144 and set CBCreate to the following code:// Change the create date to the file system create datefunction Assoc CBCreate( \ Object dapiCtx, \ DAPINODE node, \ Assoc createInfo, \ Dynamic context ) Assoc rtnVal String errMsg Dynamic apiError Dynamic status Assoc fileInfo Boolean ok = TRUE if IsDefined( createInfo.Request ) && \ RecArray.IsColumn( createInfo.Request, 'versionFile_filename' ) && \ IsDefined ( createInfo.Request.versionFile_filename ) fileInfo = File.Stat( createInfo.Request.versionFile_filename ) if IsNotError( fileInfo ) node.pCreateDate = fileInfo.st_cTime status = DAPI.UpdateNode( node ) if IsError( status ) ok = FALSE errMsg = 'Unable to update document create date' apiError = status end end end if IsUndefined( rtnVal.OK ) rtnVal.OK = ok rtnVal.ErrMsg = errMsg rtnVal.ApiError = apiError end return rtnValend
Donna Nalls
Not sure this will work because createInfo.Request.versionFile_filename is the file path on the client and your oscript will not have access to the client file from the server.If you are testing this on a single development box, yes, it works; however, i believe if you test it using a client and server you will find File.Stat() returns an undefined value.If there is a trick to make this work and retrieve data from the client machine, please let me know, as i have a client asking for something similar and this approach did not work for me.Howard Pell mentioned that he thought there was a way to do this with javascript in the create form, but i have not found the answer, as yet.regards,donna
Alex_Kowalenko_(x-eu0016039_-_(deleted))
Message from Alex Kowalenko via eLinkYou are right. That's what happens with a 5-minute solution - no integration(aka real-world) testing. So the challenge is to make this work in aclient/server environment.It would have been convenient if createInfo.Version.pFileCreateDate had theoriginal file creation date but it does not.Back to the drawing board.-alex------Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: Friday, June 17, 2005 8:26 PMTo: eLink RecipientSubject: Not sure this will work becausecreateInfo.Request.versionFile_filename is the...Not sure this will work because createInfo.Request.versionFile_filename isthe...Posted by Nalls, Donna on 06/17/2005 08:21 PMNot sure this will work because createInfo.Request.versionFile_filename isthe file path on the client and your oscript will not have access to theclient file from the server.If you are testing this on a single development box, yes, it works; however,i believe if you test it using a client and server you will find File.Stat()returns an undefined value.If there is a trick to make this work and retrieve data from the clientmachine, please let me know, as i have a client asking for something similarand this approach did not work for me.Howard Pell mentioned that he thought there was a way to do this withjavascript in the create form, but i have not found the answer, as yet.regards,donna[To reply to this thread, use your normal E-mail reply function.]============================================================Topic: Change create date for the documents...
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=4015859&objAction=viewDiscussion
: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe