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
Livelink 9.5 - Copying and embeddeding original objID in copy
abrown
Livelink 9.5 LAPIWe are going through some divestiture activities and must do some copying and segregation of content in Livelink, but copies will remain on the same server for the time being.I am trying to copy a folder hierarchy, and embed the following info from the original item in the copied items:(a) creator(b) object ID(c) audit trailWhen I use LAPI_DOCUMENTS .CopyObject with the usual arguments, then update the ObjectInfo for the copy, I can change the creator = creator of the original item (OK), and can prefix to the comment field a string like "origObID = " object ID of the original item (haven't tried using a category yet). I guess I could also construct the URL for the audit trail of the original item and drop it into the comment field, too.I am encountering two issues.One problem is that the users who can see and use the copy will probably have their permissions removed to the original. This is not a big problem for the "origObID =" part, because it can help users who have URL links to the original objects; they will get a permissions error but we can do a search or report on the "origObID =" part embedded in the copy so they can locate the copy (a Category or System extension would be better than dropping it into the Comment field). Unfortunately, the original audit trail will remain inaccessible because of permissions. Ideally, we would like to reporoduce the original item's audit trail in the copy. I don't know how to do that.Second, I have got the above to work for the top folder, but, of course, when the copies of the sub-items in the hierarchy are created, they don't get changed (creator, embedded OrigObjID, ...). I am using CopyObject(...). BTW, there is no reference to CopyObjectEx in the LAPI doc, but my Java IDE picked it up as an option - what's the difference between them?I guess CopyObject will get everything (which is what I want) but it won't apply the same updates to the container items. So, it looks like I would have to walk the folder tree and copy items one by one, updating their info in the copy. That would also allow me to deal with any Project items encountered along the way. Can CopyObject be made to work one container at a time (no inclusion of sub-items), or is their another method or approach I should use?Many thanks,Allen Brown
Find more posts tagged with
Comments
Carsten_Kulms
Message from Carsten Kulms via eLink> BTW, there is no reference to CopyObjectEx in the LAPI doc, > but my Java IDE picked it up as an option - > what's the difference between them?The differences are:- CopyObjectEx is not document and therefore not part of the API(I know, you see it ... rf. to previous posts in this discussion on thistopic)- CopyObjectEx does nothing (even NOT the same as CopyObject)
Carsten_Kulms
Message from Carsten Kulms via eLinkAfaik there is no way to copy the audit trail. (Personally I wouldprobably consider this a bug.)Also I do not know an option that hinders CopyObject to copy all subitems of a container.I think here you have to implement this logic on your own: If youencounter a container then _create_ a target container for the sub itemsinstead of copying the source container.On the other hand I would like to ask if it is really necessary tocreate copies as the new working document. Would it possibly make senseto do it the other way round: Create copies for , maybe accompagnied by an export of thecurrent audit trail, locked by permissions and _move_ the original itemsto the new places. Of course I do not know the requirements, I guess youhave good reasons for your approach.You may also like to have a look at the Ex-/Import functionality -- itprove useful in your business case.