Working with settings

Businessmate settings are a global variable that can hold values needed primarily in processes, but also by the different front-ends. The object of the settings is not that they should be used by users. An example of a use-case is that it can remember the endpoint of a mail server or remember the users’ preferences.

There are three different types of settings mostly used to control the security around them. The concept is that owners can create, update and delete settings on tables they own. If a user (most likely a workflow user) can read a table, then the user can read the settings.

Businessmate has three types of settings;

  • Organization settings¬†
  • Table settings
  • User settings

Settings for organisations

Organization settings to hold settings that are needed for one or more tables.

They can be read by every user and created, updated, and deleted by members of the “Organization Administrators”

access settingslist
Settings organisation
// ORG
await Settings.getOrganizationSettings()
await Settings.createOrganizationSetting(key, value)
await Settings.updateOrganizationSetting(key, value)
await Settings.archiveOrganizationSetting(key) await Settings.deleteOrganizationSetting(key) await Settings.restoreOrganizationSetting(key)


Settings for tables

Table settings are used to hold settings that are needed for the specific table.

They can be read by every user having read settings and created, updated, and deleted by owners of the table

table settings access
settings table
await Settings.getTableSettings(tableApiName)
await Settings.getTableSetting(tableApiName,key)
await Settings.createTableSetting(tableApiName, key, value)
await Settings.updateTableSetting(tableApiName, key, value)

await Settings.archiveTableSetting(tableApiName, key) await Settings.deleteTableSetting(tableApiName, key) await Settings.restoreTableSetting(tableApiName, key)

Settings for users

User settings are used to hold settings that are needed to be related to the specific user.

They can be read by the user and created, updated, and deleted by owners of the user table

access settingslist
settings user
await Settings.getUserSettings(userId)
await Settings.createUserSetting(userId, key, value)
await Settings.updateUserSetting(userId, key, value)
await Settings.archiveUserSetting(userId, key)
await Settings.deleteUserSetting(userId, key)
await Settings.restoreUserSetting(userId, key)

Working with settings

In a table workflow you can see the settings on the list and organisation

Settings in workflow log
Settings and variables
Settings in workflows script
Settings and variables