Prevent editing of attachments in place

I need to prevent the users from editing attachments once they are attached for regulatory & policy reasons.Looked on this forum and saw loads of posts but no real answer. BUT it did get the braincells working.

My app has:

  • attachments held in a separate document

  • the document if not editable as such, all activities are controlled by buttons

  • attaching is done in the PostOpen event.

  • the user cannot actually delete an attachment they have to use my button wihch actually hides it rather than deleteing.

  • the rich text field is not actually editable

I changed the rich text field to Computed (value of itself) and woopy do the edit & delete options disappeared from the attachment.

Now I need to prevent anyone from attaching to any other rich text fields.

Hope this helps someone else.

Subject: Prevent editing of attachments in place

We do something similar (and for similar reasons - you work in medical?)

Attachments live in separate doc.

Users have control of the attachment process and the RT field is editable.

Once saved, the doc cannot be re-edited/saved (save code lives in a save action only visible on new docs, which sets an ‘ok to save’ field - if the user double clicks the doc, and does and save, they can’t set the ‘ok to save field’ and the save aborts).

If the attachment is an error, authorized users can hide the attachment child doc with a reason so we can always see who did what, when and why.

Forms other than the attachment form don’t have RT fields so we eliminate the attachment problem entirely.

Nice work on your part.

Doug

Subject: RE: Prevent editing of attachments in place

There has been an intermittent problem with computed RichText fields, at least in R5. When dealing with large MS office documents (that’s what was mentioned in the technote, don’t know what other file types might suffer from the same problem), they sometimes got lost.

I don’t remember off hands, if newer release were prone to that issue as well, but we switched to access controlled sections instead of using computed RT fields and kept that practice.

Subject: Prevent editing of attachments in place

Would it not be simpler to use Author access and Authors-type fields to prevent editing? Combine that with versioning and you get an automatic complete audit trail.