Attach and Relate Documents using AutoScript
AutoScript contains the AttachExternalFile ( rel_name ) procedure in order 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 the attachment of document to a form record.
In case the relation is a named one the relation name (i.e. "INVOICE") updates the field RTYPE of the AU_DOC_REL record type.