Custom scripting API
parameters()
The parameters object contains context about the current page. This is available on all pages, but the properties will vary depending on the page.
api.fetch(url, options?)
The fetch method is a wrapper around the native fetch method. The wrapper adds the necessary headers and authentication for the Elfsquad API to the request.
Method parameters
The URL to fetch.
The options object to pass to the fetch method.
ui.openDialog(options)
The ui.openDialog function allows you to open a dialog and embed one or more scripts in that dialog. These scripts can be used to add your own custom behavior and content to the dialog.
Method parameters
The options object to pass to the openDialog method.
ui.reload()
The ui.reload method allows you to reload the current page. Note: this method is only implemented on the quotation & order entry pages.
dialog.close()
The dialog.close method allows you to close the current dialog. This method is only available in dialogs.