I changed the entry in a readers field and now the document no longer shows in a view. I need to delete the document but I can’t do it through a view so I am trying to write a backend LS routine to find the document by the value in a field (AQCB).
Here is what I have but I get an error on AQCBnum = doc.FieldGetText( “AQCB”).
I know that is a UIdoc method but what is the equivalent doc method? Is this a reasonable way to approach the problem?
Set collection = db.Search(searchFormula$,Nothing ,0)
Set doc = collection.GetFirstDocument
n = 0
While Not doc Is Nothing
AQCBnum = doc.FieldGetText( "AQCB")
n= n + 1
If AQCBnum = "CO0805797" Then
Msgbox "Found CO0805797"
End
End If
Set nextDoc = collection.GetNextDocument(doc)
Set doc = nextDoc
I don’t think you can get the doc in the back end either. If you are an admin just enable Full Access Administration on the server and you will have access to all docs including those where you are not a member of the Readers field. If you are not an admin then have your admin do it.
Thank you, that will be very helpful. I tried getting Full Admin Access but I can’t find anyone in the company who has it or can grant it… scary. So I am still stuck and I will try your suggestion.
Should be very carefull with readers field while uodating its very hard to recover the document. For the backend document u can’t use front end class method even though it wont through syntax error but it wont return anything. if you debug then it throws type mismatch. As jaggu suggested use
AQCBnum = doc.AQCB(0)
Make sure use any one [ADMIN] role to update author/reader field so that if reader field misses then using [ADMIN] role you can recover the document. this is the best practice. FYI… as of my knowledge you cant get full administration rights.