Attach and Relate Documents using AutoScript
AutoScript contains the AttachExternalFile ( rel_name ) procedure to attach and relate an external document (file).
The usage is:
call AttachExternalFile() {....case of unnamed relation to the underlying form record ...or}
call AttachExternalFile(“INVOICE“) {...case of named relation to the underlying form record}
In any case, the above procedure opens the form that is appropriate for attaching a document to a form record.
If the relation is named, the relation name (i.e., “INVOICE“) updates the field RTYPE of the AU_DOC_REL record type.