This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Rename a file on the vault server?

Marcel N - Wednesday, February 15, 2012 1:34 PM:

Hi everyone,

is there a way to rename a file on the vault server after the same file has been renamed in Aras?

I tried the following AML-code:

<AML>
<Item type="File" action="edit" version="0" where="[File].id = '123'"> 
<filename>TEST_NAME</filename>
</Item>
</AML>


With this code the file will be renamed in Aras, but it doesn't affect the file on the vault server.
If I use version = "1" it works, but I don’t want a new version of the file.
Any ideas how I could solve this problem?


Regards
Marcel



RobMcAveney - Friday, February 17, 2012 8:45 AM:

There's an example of this here: http://www.aras.com/projects/project-view.aspx?id=602D18E572DB447985FBDC06061565F9.

The technique is to write a server method that does something like this:

Item result= inn.newResult("OK");
try
{
  CCO.ExportImport.AddFileToRename(newFile.getID(),newFileName,result.dom);       
}
catch
{
  continue;
}

 

 



Marcel N - Monday, February 20, 2012 6:41 AM:

Thanks, that works great