Skip to content

Configuration

You can either configure actions in Lime admin in the view config for a limetype.

Or you can trigger the commands in your custom flow.

Add Action in View config

Go to Lime admin => Views => <Any limetype>.

Decide if you want a Promoted or Unpromoted action and click the add button you decide.

Add the command you want:

Common parameters

There are some common configs that apply to all commands below:

Open create new

Command id: limepkg_standard_actions.open-create-new

Parameters:

Name Required Type Default value Descriptive
limeType X string, LimeType - What limetype to create
limeObject Record<string, ValueConfig> {} What value to set in each field (ValueConfig)
route boolean false Specifies if routing to limeobject should be done after confirmation

Update lime object

Command id: limepkg_standard_actions.update-limeobject

Parameters:

Name Required Type Default value Descriptive
limeObject X Record<string, ValueConfig> - What value to set in each field (ValueConfig)

Open form

Command id: limepkg_standard_actions.open-form

Parameters:

Name Required Type Default value Descriptive
properties X Record<string, FieldConfig> - What value to set in each field (FieldConfig)
limeObject Record<string, ValueConfig> - What values to set on each field but isn't shown in the form (ValueConfig)
dialog FormDialogSettings - Settings for the dialog visualization (FormDialogSettings)

Field Config

Name Required Type Default value Descriptive
value ValueConfig - Override the existing value of the field (ValueConfig)
options FieldPropertySettings - Override the card view settings for the property (FieldPropertySettings)

Field Property Settings

You can override all properties on the šŸŒLimeSchemaOptions from Lime Elements

This is some extra settings that can be overridden.

Name Required Type Default value Descriptive
required boolean - Override required
readOnly boolean - Override read-only

Form Dialog Settings

Name Required Type Default value Descriptive
heading FormDialogHeading - Heading settings for the dialog (FormDialogHeading)
size FormDialogSize x-small Size of the dialog (FormDialogSize)
autoHeight boolean true If the height should be increased based on the field sizes, instead of a fixed height
closingActions closingActions {"escapeKey": true, "scrimClick": false} šŸŒClosingActions from Lime Elements

Form Dialog Heading

You can override all properties on the šŸŒDialogHeading from Lime Elements

This is some extra settings that can be overridden.

Name Required Type Default value Descriptive
color string Limetype color Color of heading

Form Dialog Size

Available sizes:

Name Descriptive
x-small Single column view
small Two column view
medium 5 column view
large Bigger 5 column view
fullscreen 5 column view in full screen

Create new

Command id: limepkg_standard_actions.create-new

Parameters:

Name Required Type Default value Descriptive
limeType X string, LimeType - What limetype to create
limeObject Record<string, ValueConfig> {} What value to set in each field (ValueConfig)
autoAttachRelation string Takes first relation that matches LimeType to create What relation tab on the current object to use for relating the created object

Command id: limepkg_standard_actions.open-link

Parameters:

Name Required Type Default value Descriptive
link X ValueConfig - What value to set in each field (ValueConfig)
openInNewTab boolean true If the tab should open in a new tab by default
type LinkType url What type of link it is (LinkType)
Name Descriptive
url A URL link (Adds https:// if it's missing)
email An email link (Adds mailto: if it's missing)
phone A phone number link (Adds tel: if it's missing)
custom A custom link (Doesn't add anything)

Common config

Value config

Must set either constant OR formula

Name Type Default value Descriptive
constant unknown - Hard coded output value
formula string - A formula that will be rendered. Read more about it here
expectedOutputType OutputType auto What type data type the output should be casted to (OutputType)

Notification parameters

Name Required Type Default value Descriptive
notificationMessage X string - What message the user should see
notificationOptions NotificationOptions {} Settings for the notifications Read more here

Confirmation parameters

In each command it's possible to configure the following under the confirm parameter in the command.

Name Required Type Default value Descriptive
title X string `` What title the user should see in the confirmation box
message X string `` What message the user should see in the confirmation box
options ConfirmOptions {} Settings for the notifications Read more here

Output type

Name Descriptive
auto If property given, cast based on property type. Otherwise tries to guess the type based on the output value
int Cast to int defaults to null
float Cast to float defaults to null
str Return raw result as string
datetime Cast to datetime if possible
list Cast to a list if possible

Translations

All text parameters you can give is translatable using translation keys. And it also supports placeholders that can be replaced to the commands context.

Name Support Descriptive Example value
limeTypeName All commands Singular name of the limetype you're on Company
limeTypeNameLowerCase All commands Singular name in lowercase of the limetype you're on company
limeTypeNamePlural All commands Plural name of the limetype you're on Companies
limeTypeNamePluralLowerCase All commands Plural name in lowercase of the limetype you're on companies
descriptive All commands Descriptive of the limeobject you're on Lime Technologies
toCreateLimeTypeName Open create new and Create new Singular name of the limetype you're about to create Person
toCreateLimeTypeNameLowerCase Open create new and Create new Singular name in lowercase of the limetype you're about to create person
toCreateLimeTypeNamePlural Open create new and Create new Plural name of the limetype you're about to create Persons
toCreateLimeTypeNamePluralLowerCase Open create new and Create new Plural name in lowercase of the limetype you're about to create persons

Next command

We support something we call Chained commands, meaning that all commands can configure a Next Command that will be executed after the success of the current, this could be a new Standard action or a completly different one.

There are some rules we follow:

  1. We will pass the same context (Limeobject and LimeType) to all commands in the chain.
  2. You cannot have any conditions like "Only run command if condition X is met"
  3. If one command fails, it will show a error message and it won't continue to run the next command.

In each command it's possible to configure the following under the nextCommand parameter in the command.

Name Descriptive
id Id of the command to execute after this one
params What extra params to pass to the nextCommand