Create custom actions and place them either on the Detail Page, Activity Timeline or right on the Card. There are different type of App Actions:
- System. Pre-existing ones like Edit or Delete Records.
- Automation. On App Action click, trigger your automation.
- Custom Code. Create your own flow.
- Mobile.
Edition Qualifier: App Actions are available for all FreeAgent CRM editions.
User Permissions: Only Administrators can create App Actions.
Prerequisites: For the Automation type, the desired Automation has to be created before adding a new App Action.
In this tutorial we will cover the following topics:
- Navigate to App Actions
- Create App Action
- Automations
- Custom Code App Actions
- Custom Code Examples
- Form Rules for App Actions
Navigate to App Actions
Open the menu and go to 'Admin Settings' to display the available options, then click App Setup to display all your existing Apps. Then select your desired app and click on 'App Actions'. You can also use the search function to get there faster, just start typing 'App Actions'.
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 |
Description | Used to add the details for the App Action. |
Name | Identifies the App Action. |
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 |
Activity 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. Mobile. Enables the App Action on the mobile App. |
Type |
Automation - It will allow you to select from any of the existing automations in the field available above. Custom Code - For more complex actions that might involve 3rd party apps. |
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 App Action to modify and click the 'Edit' button. Make your changes and save once you are done.
Deactivate / Activate App Action
Select the App Action that you want to stop using and click the 'Deactivate' button. To start using it again, click the 'Show deactivated' checkbox to show all App Actions, select it and click the 'Activate' button.
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 setup 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 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