Edit

ImportImage (domain, ident, path)

Definition:  Loads an image file and attaches it to a transaction, item, asset, or other 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). Do not use numeric-only key identifiers—these are reserved for asset images in v9, so you should use a prefix unique to your use-case to ensure not collision of keys. e.g. "key:MYPREFIX_"+actual_key