ImportImage (domain, ident, path)

Definition:  Loads an image file and attaches it to a transaction or item record.

domain may be “transaction”, “product” or (from version 8) "key"

ident is the sequencenumber for a transaction or product code for a product or any identifier of your choosing for key

path is the filesystem path to the image file to import and attach to the record (a posix path on Mac).

Image files are stored in a "Pictures for Companyname " directory in the MoneyWorks Custom Plugins folder.

If the path is an empty string, any existing image for the domain+ident will be deleted.

Availability:  The ImportImage function is available in MWScript in version 7.2 and later

The key usage is new in version 8. Use this to store images with arbitrary identifiers that may or may not correspond to records in the database. It is up to you to use an identifier scheme that will guarantee unique identifiers for any image you may store (and won't collide with image identifiers for any other scripts you may install).