Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
C# - using LAPI to add docs and update metadata (owner, createDate)
TimWilliams
I'm trying to use LAPI in C# to migrate a bunch of docs from a fileshare into LiveLink. I don't want to just drag in via webDAV because I'd like to keep as much of the existing file metadata as possible (creator, createDate, lastupdate).I can use AddDocument() to add a file, and this returns both an "objectInfo" and "versionInfo" for me to work with, but although I'm able to use these to update (eg) Name and Comment using UpdateObjectInfo(), I've had no success with updating dates or useId's.I did trawl through the posts in this forum, but the only possible leads all point to one post which seems to be now "restricted access". Has anyone had any success doing what I'm trying to do, and if so would you care to share some pointers (or code...) ?Thanks for any suggestions,Tim
Find more posts tagged with
Comments
Appu_Nair
LAPI documentation says it supports this manipulation throughUpdateObjectInfoCreateDate Date A value object of type Date indicating the date and time on which the object was createdThe preferred way to create documents is thru the CreateObject and CreateVersion methods as AddDocument seriously gets in the way of metadata a OT sample below
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=3743432&objAction=ArticleView&viewType=1I
coded this a few years back where I update some info on a newly created object see if that makes sense
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=16473308&objAction=download&viewType=1I
have not tested this.Some more info.LAPI is in sunset mode so you are better off webservicing this.Some people may take exception to why manipulate createdate because it is the date it is created in livelink so run it by your org's RM people if any to see if you are right in your approach.OT's own ObjectImporter is a great way for migrating stuff and you can do a lot of stuff with that.Also the legacy createdate can also be stored as custom cat/att metadata IMHO
TimWilliams
Appu,Thanks for the reply. I already used your first sample to get started with the API - it got me most of the way there. I did just yesterday manage to figure out how to work with dates. What I was hoping to get at was the "last modified" date which displays in the main LL folder listing page - that does not seem to be accessible. However, I did manage to update the creator and create date for the created object and version 1.I'm using the API just because we have it and it seems to do what I need - this is not an "enterprise" thing I'm doing, just a one-time import of files from a fileshare. I'm not using the ObjectImporter since I can't really justify the $$.I totally understand your concerns around manipulating createdates and possibly other information, but in this case the docs are not under any kind of regulated environment, and the aim is to ease the transition from using fileshares to using LL by trying to carry over document metadata to LL (since it does provide useful information).Cheers,Tim
Appu_Nair
According to documentation it seem they don't want you to touch thisModifyDate Date A value object of type Date indicating the date and time on which the object was last modified Not ApplicableMaybe somebody else may help you good luck
TimWilliams
Thanks,I think at this point I can do as much as I need to. Tim