Plugin bundled files

Files bundled in the plugin’s file directory are intended for storing small resources.

It’s recommended you use bundled files for storing form specifications, which are lazily loaded when you use the plugin’s form() method.


function loadFile(pathname)

Load a file from the plugin’s file directory, returning a BinaryData object.


To lazily load a lookup table from the file/lookup/departments.json, use code like:

var departmentsLookupCached;
var getDepartmentsLookup() {
    if(!departmentsLookupCached) {
        departmentsLookupCached =
    return departmentsLookupCached;