Error 404 on ?openDocument

I know this will sound basic but I can’t figure out why I am getting this error, I have opened documents this way in the past.

I am generating a link on a web form via an AJAX call. The Ajax rotuine calls an agent which looks up the attachment based upon the unique id. The unid is generated in a computed when composed field on the form. I open a seperate attachments form from by using a javascript widnow.open function and pass the unid which is stored as a key in the new attachment form. The attachment form uses the file upload control.

I format an anchor link with the information that is returned from the Agent. When the process runs I get the link below, which is exactly what I expect but gives me the HTTP 404 file not found error.

http://Myserver/MyDB.NSF/Lookup/80CE62659F08FBF28525720B0056DFBF/$file/eng2.gif?OpenElement

I have verified that the document exists in the Lookup view, and the first column is sorted with the correct unid.

Subject: Error 404 on ?openDocument-Solved

I think,it appears that I have a problem when I try to use a unid as a key, since I am actually creating the attachment in another document I need to use the unid of the actual attachment doc.

I thought ?openelement would work with any unique key from the attached doc.

Subject: Error 404 on ?openDocument

In your view column for the UNID, is it wrapped in @Text()? Make sure you can see that view on the web. If that’s okay, then is your database path correct?