You are viewing limited content. For full access, please sign in.

Question

Question

SDK Recyclebin Object...

SDK
asked on March 11, 2014

I am running into an error when I try to use the Restore method of the static RA Recyclebin object.  Unfortunately the RA documentation is somewhat sparse.  Here is a short code snippet that throws the error;

       Dim raSession As New Session

        raSession.Connect(New RepositoryRegistration("localhost", "LFMAIN"))
        raSession.LogIn("admin", "admin")

        RecycleBin.RestoreEntry(96935, "\", raSession)

        raSession.Close()
        raSession = Nothing

When the RestoreEntry method is called I get an unhandled exception error "Unknown error. (-2147024809)"

 

SDK version is 9.0

 

0 0

Answer

SELECTED ANSWER
replied on March 11, 2014

I believe the second parameter is what you want the path of the restored entry to be, not just the path to the new parent folder.  So it would be something like:

 

RecycleBin.RestoreEntry(96935, "\example.docx", raSession)

Typically you would construct that string based on the name of the recycled entry, but we need to give you a way to restore an entry and avoid name conflicts.

0 0
replied on March 11, 2014

Ahh, I 'assumed' that the path parameter was just setting the old (or new) parent folder not that I needed to supply the full path and document name for the restore!

 

Thanks!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.