Hello,
Does anyone know if you can change the physical name of a document using the LAPI?
Thank you very much in advance
Regards
Elisabeth
Not sure what the intention is but for what its worth here's something that I know will work
LLValue objectInfo=new LLValue().setAssoc(); //in that crazy (actually awesome)object pass the new name as second param objectInfo.add("NAME","whatever name I gave"); //Now in that objectid give the dataid of the object in livelink objectID=11351; if (doc.UpdateObjectInfo(volumeID,objectID,objectInfo ) != 0)
Here's something that I wrote earlier for somebody wanting to rename stuff hope you can understand it https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=21905571&objAction=download&viewType=1
it was written for a different purpose so I have included a read me in that.
Thank you very much for answering. I think that I have not explained well , I'll do an example....
I have to do a load of documents from my computer to livelink .
I do it through the API. If a condition is met , the document is created with a different name.
......
if (idDocumento!= null && (principal == 1)){
String [] separaciones =nombreDocumento.split( "\\." );
log .info( "tamaño separaciones " + separaciones. length );
extension = separaciones[(separaciones. length )-1];
nuevoNombre= numeroDocumento + "_" + tituloDocumento + "." + extension ;
log .info( " ** nuevoNombre " + nuevoNombre);
log .info(rutaCompleta + nombreDocumento);
//Add a version to the document object
if ((estado.equals( "Vigente" ))||(estado.equals( "No vigente" ))){
// versión mayor
createInfoDocInt.add( "IsMajorVersion" ,LLValue. LL_TRUE );
}
doc.CreateVersionEx(0, idDocumento,createInfoDocInt, rutaCompleta + nombreDocumento, versionInfo);
log .info( "Creado la versión del documento " + nombreDocumento);
// cambiar los valores
asignarNuevosValores (idDocumento,catIDDocumentacion,catVersionDocumentacion,lapiDocuments,lapiAttributes, estado, fechaAprobacionDate );
.....
My question was, if you can change the physical name , ie which appears in the versions:
ups, I add the code where I create the document:
..........
log.info(" ** nuevoNombre " + nuevoNombre);
//Creamos el documento del producto
objectInfo=lapiDocuments.crearDocumento(idPadreDocumento,nuevoNombre,createInfoDocInt);
idDocumento=objectInfo.toInteger("ID");
…….
UpdateVersionInfo call perhaps
for name in props if ( IsFeature( .fInArgs.VersionInfo, name ) ) retStatus.( 'p' + name ) = .fInArgs.VersionInfo.( name ) // Do not Xlate end
I see in oscript this and perhaps that may do it,You have to first do a GetVersionInfo assoc and change it in there and try.
I don't have time to try but saw this in documentation
From: eLink Entry: LAPI Forum [mailto:lapi@elinkkc.opentext.com]Sent: Tuesday, April 10, 2012 12:46 PMTo: eLink RecipientSubject: change the physical name of a document
change the physical name of a document
Posted byanair@alitek.com (Nair, Appu) On 04-10-2012 12:44
[To post a comment, use the normal reply function]
Topic:
Forum:
LAPI Forum
Content Server:
Knowledge Center
Do check with people like Howard Pell /Kyle Swidrowich or somebody that knowledgeable whether the FILENAME attribute which you can update with the above call can be used I tested that and it is indeed the "FILENAME" that will get you to do that.
The premise of FILENAME is the actual file name that came from a user's computer.If you change that you have lost that info so it is akin to certain records like creator or something that is basically immutable.One way to know is whether the new websvcs has a corresponding call.If they have not provided it that means it is a immutable field.That is how I would figure that one
.