We have a LiveCycle XFA form that contains a "silent save" trusted function using doc.saveAs().
No problem with this system, works fine - but I'd like to address one inconvenience by including a link to the file's location in the status e-mails. The idea is to click the link to open the file. I've successfully written script to accomplsh that. The problem is that the "silent save (doc.SaveAs) fails when the file is opened via the Outlook link. I get the "file may be read-Only" error message: "The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder."
I assume there is a step I'm overlooking somewhere, but I just can't figure out what. Does anyone have any suggestions?
It's because the form opens as temporary file I believe.
Your saveAs script then propably has no access to the network drive.
Thanks radzmar. Great suggestion to explore. I saved the original path/filename in text fields, saved the form, and emailed the link, closed the file. Immediately after opening the file from the link, I tried the saveAs() routine to save it to the path/filename stored in the form. Same error result - "may be read-Only ...."
Next I tried saving the opened-by-link file with a different "temp" name. SaveAs() worked ... saving the file without the error. Then I saved it using the original path/file name saved in the document. That also worked without the error. I guess the opened-by-link file has to be "disassociated" with Acrobat to avoid the read-Only error.
Now I just have to determine the easiest way to delete the temp file from the network.