A block action is an action button that appears on a block, such as an Add, Update or Delete button, or a link button to another location. A block can have more than one block action.
Each block action has a number of properties that define its style and behavior. Each block action also has its own independent access control, so you can define policies on a block action level. For example, you may allow both employees and managers to see a particular block but only allow managers to Add new rows.
Block action properties
Block actions have the following properties:
Property | Description |
---|---|
Title | A title for the action. This is used as the button label for that action. |
Object | The object of the block action. This must be the same Object as the owning block. See block action access control. |
Operation | The operation that will be used when the action is performed. This is required. Choose between LINK, PUT, POST or DELETE. Use LINK to link to an existing in-app page or another URL. Use PUT, POST or DELETE to call a REST API. |
Page Id | The Id of the page to link to when using LINK and an in-app page. This is the first part of the page's hyperlink (see Pages). |
Object Id |
The object Id to pass when the operation is LINK. This is the second part of the item's hyperlink (see Pages). The {INSTANCE_PK1_VALUE} to {INSTANCE_PK5_VALUE} tokens can be used here to pass the value from the object's primary keys. |
Show in modal | When selected, the in-app page will be opened inside a modal window. |
External URL | The URL to link to when using LINK and an external URL. |
REST endpoint | The REST API end-point to call when using PUT, POST, or DELETE. |
Icon | Optional icon to show in the block action |
Weight | Choose between light or normal. In general, use light for less-used secondary actions (such as Delete) and use normally for primary actions regularly performed. |
Color | Set the color of the block action. Typically:
The exact color of the buttons will vary according to your color theme. |
Confirmation | An optional confirmation message to show when pressing the action. This is useful when the action is being performed and has significant consequences. Use this sparingly to avoid user frustration. |
Block action access control
Access control for block actions follows the same principles as block access control. The Object on a block action must be the same as its underlying block. If a block does not have an object then its block actions must also not have an object.
Although block actions are based on the same object as its blocks, you can specify different access policies. For example, you could:
- Grant blocks actions to completely different roles. Example: super users see a Delete block action that regular users are not authorized to use.
- Grant block actions to different object Ids. Example: provide an employee role access to see a Phone numbers block against all object Ids (so everyone can see everyone else's phone numbers) but restrict the Edit block action so only the owner is allowed to update their numbers.
Create a block action
To create a block action:
- First, find the block on which you wish to create the block action. See Updating a block.
- Then go to Block actions: Add
A block action will not be visible until it has at least one access policy.
Update a block action
To update a block action:
- First, find the block where you wish to edit the block action. See Updating a block.
- Then go to the Block actions section and select the block action you wish to edit
From here you can edit the block action's settings and manage its access policy grants.
Delete a block action
To delete a block action:
- First, find the block where you wish to delete the block action. See Updating a block.
- Then go to the Block actions section and select the block action you wish to delete
- Hit the Delete button