How we have some Form Fields and Form Sections set up in our new app. You could just stop there for a basic app where you just want to collect information. If you'd like to learn how to do more please continue reading.
We'll cover the following topics:
Open the menu and go to Settings > Apps, and select your app. You can also use the search function to get there faster, just start typing 'Apps'. Select the app you've been building and then select 'App Actions'.
App Actions
App Actions allow you to add custom actions to various places within your app. Think of them as custom choices within various options menus within your apps.
Create App Action
There are a few elements to take into consideration when creating a new App Action, you can see the details for each of them in the table below:
App Action Creation Fields | Description |
Name | Identifies the App Action. |
Action Hint | A brief description of what the action is for. |
Icon | Enables you to select from the current icon selection. |
Appearance | Default - Light grey colored button. Primary - The button will have the main color of the selected theme. Secondary - Light grey colored button. |
Roles | Select the Roles that will have access to the App Action |
Placement |
List - adds the action to the options menu within the list view. Timeline - Adds it to the Actions button. Card - The Action will be listed in the 3 dots icon on the top right corner of the Card. Detail Page - The buttons will show up on the top right corner of the detail page of any record. Event Log Card - Mobile - Enables the App Action on the mobile App. Notification Card - Related - This is the related list that shows in the detailed view of any record within an app. In this example, I've created an Action in the 'Contacts" app and it shows up in the related list options menu of any other app where Contacts are referenced. |
Type |
Automation - It will allow you to select from any of the existing automations in the field available above. Bulk - This setting allows you to apply an action to many records at once by using a bulk condition (to determine when an action can be applied in bulk) and a bulk action (what action will occur when the button is pressed). Custom Code - For more complex actions that might involve 3rd party apps. Dropdown - works in the same capacity as an overflow but instead of an ellipse/three dots its a dropdown button/arrow with options and sub Overflow - This allows for a vertical ellipse to host more app actions in the form of child app actions. Great for storing other app actions like "audit log" and "delete" or anything else you wouldn't use frequently but would need convenient access to. System - For existing App Actions like Edit, Delete, Create, Audit Log, and duplicate. Widget - You can reference any of our widgets within the system and have them perform an action. |
Automation | If the type is 'Automation' here you will need to select the automation that will be triggered when the App Action button is clicked on. |
Custom Code | Here is where you can add the code for your App Action. From simple status changes to more complex integrations with 3rd party apps. |
Once you have saved your App Action, if you go to the detail page of any record of that App, the App Action will be available according to the configured placement options.
Edit App Action
Select the "..." icon next to the app action name and click the 'Edit' button. Make your changes and save once you are done.
Deactivate / Activate App Action
Select the "..." icon next to the name of the app action and click on 'Deactivate'. To start using it again, click the 'Show deactivated' checkbox to show all App Actions and click 'Reactivate' in the same menu you used previously.
Reorder App Actions
You can change the order in which the buttons appear on the detail page, just click the 'Reorder' button and drag & drop your App Actions in the desired order. Then just save your changes.
Automations
In order for the App Actions to do something, it is necessary to create an Automation for them. There are different types of Automations available, from the creation of new records or tasks to more elaborated ones, like those based on Custom Code. To learn more about Automations and how to create them, please visit the following tutorial:
Automations
Custom Code App Actions
FreeAgent CRM allows you to easily set up powerful App Actions via custom code. When creating a new App Action select 'Custom Code' or 'Bulk' within the Type field to enable the custom code window below:
This code will now be editable and with a few simple modifications, you can create a robust App Action. Through this feature, you will empower your team to achieve seemingly complex flows with the simple click of a button.
Custom Code Examples
Let's use custom code to set up an App Action. For this example, we will be setting up an 'Add Contact' button within the Accounts app which will appear on the detail page of any given account.
From here your team will be able to quickly create a new contact directly from the Accounts app.
To get started, navigate to the App Actions page of your Accounts app. Click on 'Add New App Action.' Set the Required Fields as shown below:
Note that the 'Placement' field must have one selection, in this case, the 'Detail Page,' but multiple placements for the App Action button can be selected.
Now it's time to input the custom code to enable the App Action. In the 'Custom Code' field that is now editable, enter the following code and click 'Save.' You've just created an 'Add Contact' App Action.
(function(record, context){
const accountId = record.id;
const accountFields = record.field_values;
const accountIndustry = accountFields.industry_catalog_id;
const accountName = accountFields.name;
context.clientAPI.showModal('entityFormModal', {
entity: 'contact',
initialValues: {
first_name: `${accountName.value} Contact`,
industry_id: { id: accountIndustry.value, name: accountIndustry.display_value },
logo_id: { id: accountId, name: accountName.value },
}
});
}(record, context));
This code can be formatted and applied to different use cases, refer to this table:
Code Segment |
Function |
entity: 'contact', | 'contact,' will specify the App function of the button. See below for an example |
first_name: `${accountName.value} Contact`, |
For non-dropdown fields, directly set value like this |
industry_id: { id: accountIndustry.value, name: accountIndustry.display_value }, | For dropdown fields specify ID and name like this |
Modifying the following code segment will allow you to choose the App functionality of your button:
entity: 'contact',
For instance, let's create a 'New Quote' button within the Opportunity App. The process will be similar, create an App Action within the Opportunity App. Name the App Action 'New Quote' and choose your desired placement(s).
You will use the base custom from the previous example, with a few changes. Refer to the above table to set your desired field configurations and make this code change:
entity: 'quote',
Click 'Save' and now you will have a custom App Action button to create a New Quote from a given Opportunity.
Refer to our most popular use case to see a sample of custom code and how to modify the parameters: Publish Via PDF Template
Form Rules for App Actions
You can create a set of conditions for App Actions. If those conditions are not met, then it doesn't matter how many times you click the App Action button, nothing is going to happen. To learn more about them, please visit the following tutorial:
Form Rules
Access Control Lists
With FreeAgent CRM Access Control List (ACLs) you have the option to limit the access your team members have in your Apps, based on their Roles, in two different levels:
- Field - Limits write or read access to a specific field.
- Record - Limits create, delete, update, or read access to the records.
You can use conditions to further specify when a role should have limited access to those operations.
User Permissions: Only Administrators can use this feature.
Navigate to Access Control Lists
Go to Settings > Apps then select your desired app and click on the 'Access Control List' tab. You can also use the search function to get there faster, just start typing 'Access Control List'.
Create a New Access Control List (ACL)
To get started, click the 'Add Access Control List' button. Here is a detail of the information needed to create an ACL.
Field | Description |
App | Select the App for which you want to create the ACL. |
Type |
Field - The Access level will apply at the field level (selected field*). Record - The Access Level restriction will apply at the record level. |
Field* | Select the field from those on the list. |
Field Operation |
'Write' means that the selected roles can edit the values for that field. 'Read' means that the selected roles will be able to see the values but can't edit them. |
Roles | Select the roles that should be able to perform the operation. |
Next, if needed, you can create Conditions. These are especially useful when you expect the ACL to work only when certain circumstances occur.
Conditions
Note: conditions can only be created for ACLs for Records.
It is also possible to create conditions for the Access Control List. These rules are inclusive, meaning that all the rules you specify need to occur for the ACL to work. Just click 'Add Conditions' to create your own set of rules.
The operators will vary according to the type of field selected. Here is the list of those available:
Operator | Description |
Is, Is Not |
The selected value is included (IS) or excluded (IS NOT) from the filter results.
|
Exists, Does not Exist |
(Exists) can be any value for the selected record. (Does not Exist) no value exists for the selected record., |
Special Considerations
There are some things to keep in mind when creating ACLs.
- Only the selected roles will be able to perform the selected operation. If the role is not part of the list, they won't be able to perform it..
- Conditions shouldn't be added when the ACL Type is Record and the operation is 'Create'. Since the record doesn't exist yet, there is no information available to match the fields used in the conditions.
- Once you create an ACL of type Record for any operation, it is required that you create ACLs for the other operations. If you only add one for 'Create', the other operations are not going to be available for any team member.
For more information on Access Control Lists see the following articles:
Automations
Automations help you and your organization do more, automatically. You can use them to:
- Assign Work
- Do Work Automatically
- Integrate FreeAgent to other systems or processes.
User Permissions: Only Administrators can create automations.
Automations are a powerful tool within FreeAgent. To learn more see the following article:
Navigate to Automations
Go to Settings > Advanced > Automations.
Create a New Automation
To get started, click the 'Add Automation' button.
Give your automation a name and select the App for which you are creating it.
Choose a Trigger
Now you will specify when this automation should be triggered. The following table describes each trigger option available in this step.
TRIGGER | DESCRIPTION |
Before Create | Action to be performed before a new record is created. Its best used as a validation step. |
Before Create / Update |
Combines the 'Before Create' and 'Before Update' triggers into a single one. Recommended when a single automation needs to consider both scenarios. Under fields, you will need to select one more multiple fields that will be used to trigger the workflow if they are updated and match the conditions (if available). |
Before Update | Action to be performed before a record is updated. Its best used as a validation step. |
On App Action | As soon as you click the App Action Button, the automation will be triggered. |
After Create | As soon as you create a new record on the specified App, the automation will occur. |
After Create / Update | Combines the 'After Create' and 'After Update' triggers into a single one. Recommended when a single automation needs to consider both scenarios |
After Update | When a change in the selected field is detected the automation will take place. |
On Webhook | Requires Webhook. The automation will occur as soon as the Webhook gets triggered. |
Schedule Chron | Think of this as a recurring event, you will be able to specify how often you want the automation to occur. This value is based on the Crontab system. Set this value with your current time zone in mind, not UTC. |
Schedule Field | A single event is triggered on a specific date, determined by the field selected. |
Note: For all triggers that include an 'Update', you will need to select one more multiple fields that will be used to trigger the automation if they are updated and match the conditions (if available).
To learn more about App Actions, please visit the following tutorial:
App Actions
To see an example of a Schedule Automation, please visit the following tutorial:
Schedule Automations
Conditions
It is also possible to add one or more conditions to the automation. These rules are inclusive, meaning that all the rules you specify need to occur for the automation to be triggered. Just click 'Add Conditions' to create your own set of rules.
The operators will vary according to the type of field selected. Here is the list of those available:
Operator | Description |
Contains, Does not Contain |
The field value needs to either contain or not contain the values your enter as part of the condition. |
Exists, Does not Exist |
The condition value either exists or does not exist. |
Is, Is Not |
The selected value is included (IS) or excluded (IS NOT) from the filter results.
|
<=, >= |
Less Than or Equal To; Greater Than or Equal To, will return records that fall above or below the selected value. |
Between |
This will return all the records that fall between a given range of numbers or a range of dates. |
Period |
Returns the records for a specified period, such as Last Week or This Month. |
Relative |
From X to X days, months, or years. |
After / Before |
All the records fall before or after the specified date. |
Actions
The next section is where you specify the Actions for your automation. This will allow you to define what will happen when the conditions you set up before occur.
There are numerous different Action types available. To learn more about them, click on the following tutorial:
Your automation can have either a single action or multiple ones, and they could be a combination of the two types available.