Configuration

Below is an example of a configuration for the Lime Bootstrap app.

<div data-app="{
    app: 'addon_oneflow',
    config: {
        mode: 'windowed',
        table: 'deal',
        linkField: 'documentlink',
        idField: 'oneflowid',
        defaultCountry: 'SE',
        companyName: 'Lime Technologies',
        usePersonRecipients: true,
        useCustomRecipient = false
    }
}"></div>
Parameter Values Comment
mode actionpad, setAccount or windowed The app can be loaded in three different modes. All confiugurable thorugh the config property mode. The actionpad mode is used for showing document metadata in the actionpad and opening any of the other views. The setAccount mode is used in a modal window where the user can choose which account to associate with the deal. The windowed mode is used when creating a document in Oneflow.
table <TABLE_NAME> The database name for the deal table.
linkField <DATABASE_NAME> The database name for the field containing the link to the document.
idField <DATABASE_NAME> The database name for the field containing the document id in Oneflow.
defaultCountry
companyName
usePersonRecipients true or false Set to true if recipients should be fetched from the persons table, as is standard. Default is true.
useCustomRecipient true or false See separate section below. Default is false.
customRecipientConfig See separate section below.

Customizations

Custom Recipients

In solutions where you only have one customer tab that mixes companies and persons, there is an option to fetch recipients directly from the company relation instead of from the persons related to the linked company.

In order to activate this, change the useCustomRecipient property to true. If there are no useful person records connected to the linked company, also set usePersonRecipients to false.

Additionally there is a config property called customRecipientConfig where you can specify more details about this setup.

customRecipientConfig: {
    class: 'company',
    name: 'name',
    email: 'www',
    phone: 'phone',
    source: 'AO_Oneflow.GetRelatedRecipient',
}
Parameter Comment
class Table for the custom recipient.
name Field from where to fetch the name.
email Field from where to fetch the email.
phone Field from where to fetch the phone.
source A VBA function that returns an LDE.record. At the moment it only supports a single record, but this could be expanded upon in the future. The values above in the code example are the default values in the app.js file and will be used if useCustomRecipient = true and no customRecipientConfig is supplied.