by 38 Elements

Do more with less clicks in your CRM! The Sugar Time Saver add-on makes it super easy to speed up repetitive data entry. Create smart action buttons in SugarCRM that will create records for you and pre-populate fields with information so you don’t have to.

User Guide

Table of Contents

Plugin Support

To receive any kind of support related to Plugin, you can easily access our support portal from new link that has been added to Admin section. Access to support portal can also be found on our website at www.38elements.com

image

How to use Plugin

Now when the module is installed and license is validated, you can create your first action button. You can do so by going to ‘Action Buttons’ mega menu link. It’s important to point out that you should see a custom configuration page after following said link, and not default SugarCRM page like all other modules have.

image

If you’re seeing a default <a href="https://www.38elements.com>SugarCRM module" layout (as pictured above), please clear your browser’s cache and reload the page. This can happen only the first time you’ve accessed this page and it will not happen ever again. Configuration page that you should now see is as follows:

image

First step in action button configuration is selecting a module that this button will be displayed on. Let’s point out right away that action buttons can be placed on record view, list view as well as subpanels of any SugarCRM default or custom module.

There are 2 types of action buttons that you can create:

  1. Button that creates a record related to record you have created a button on

  2. Button that edits a record you have created a button on

Configuring and using both button types will be explained in detail in the following text.

After the first action button is created for particular module, a ‘Time Saver’ custom field will be created for that module and placed on all the views. This field will house all the action buttons that you create for any particular module.

Creating action button for creating related record

The best way to showcase configuring and using an action button is via example, so we’ll create a button for Contacts module that creates a related Call. We’ll select ‘Contacts’ from the drop-down and click ‘Create’. Now we should be presented with new configuration view. Select ‘Create Related Record’ from ‘Button Action’ drop-down. Next step is selecting an icon, and you can do so by clicking on ‘Choose’ button next to the ‘Button Icon’ label. You can also select a color for your icon different than default grey. Please be informed that list of available icons is long and you can scroll down to inspect all available icons.

After icon selection you can set if you want to see help text when the icon is hovered on by setting ‘Show Help Text’ drop-down to ‘Yes’. If you opt to show help text, a text area should be presented to you so you can enter your help text. Help text popup is shown in the following image.

For the last step in this basic configuration we’ll select ‘Calls’ from the drop-down list of available related modules (located next to ‘Create related record of’ label). Please note that in the list of available related modules you’ll also see the relationship name (between module that button is being created for and selected related module). We’ll select default ‘calls_contacts’ relationship in this case.

image

We’ll not set up pre-populate values for now, so go ahead and click on ‘Save’ button in upper right corner. After this, ‘Time Saver’ field will be created on Contacts module, and it’ll be placed automatically on following views:

  • Record view: Time Saver field will be positioned in the first row.

image

  • List view: Time Saver field will positioned as the second column.
<!-- -->
  • Subpanels: Time Saver field will appear on all ‘Contacts’ subpanels as well (as the second column).

Clicking on our newly created action button (from any view) slides down a drawer for creating a new call. Said call will be related to contact that action button was clicked from.

image

We’ll rarely have any use of creating a related blank record, so we should now explain how to pre-populate the related record that’s about to be created.

Setting Pre-populated Values

Creating an action button that creates empty related record is just the tip of an iceberg of functionalities that action buttons module has. True value of action buttons lies in configuring values that should be pre-populated when related record is about to be created. For example, we can set a button on contacts that creates related call, and pre-populates call record with subject and start date.

In order to do that we’ll go back to ‘Action Buttons’ module and edit existing action button field (or create a new one).

In section that follows we’ll break down setting pre-populated fields by the field type.

In order to add a pre-populated value on related record you first must select a field by selecting it from drop-down that’s next to ‘When related record is created pre-populate following values’ label. Clicking on ‘Add Field’ will add it to configuration table, and you’ll be able to see the field’s name along with possible actions that can be taken on that field.

Based on selected field’s type, there are 3 possible actions:

  1. Setting a ‘Fixed Value’ - related record create drawer will slide down with configured fields already prepopulated with values that you set.

  2. Setting a ‘Parent Value’ - parent value will be copied to related record. In our previous example contact is considered to be a parent module and Call is a related module. There are some limitations in terms of which field types from parent can be copied into related module’s fields.

  3. Setting a ‘Calculated Value’ - this option is supported for some of the field types and allows setting a ‘formula’ that will be rendered on related record create view. More on this interesting feature can be found in the next text.

  • Setting a text field

We’ll move on with setting pre-populated values on action button made for Contacts to create a related call, and we’ll try to set a subject.

Selecting ‘Fixed Value’ as pre-populate action allows setting a string of text (e.g. ‘Follow-up call’) and that text will show up when related call is about to be created using action button.

Setting a ‘Parent Value’ for a text field would mean that any selected text field from parent will copy its value to newly created related record.

Setting a ‘Calculated Value’ provides you with many more options than setting ‘Parent Value’. This way you can set a string of text along with tokens that represent parent’s fields that will be replaced at the moment an action button is used.

In the example above you can see that we added a couple of parent’s tokens by first selecting a field from the dropdown and then clicking ‘+ Add Field’ button. This will add a token in the form of {{:::field:::last_name:::}} at the end of the text. You can move the token to different part of text by copying and pasting it and you can use multiple tokens and one token multiple times. Please make sure that tokens stays intact if you move them around.

It’s important to notice that pretty much every parent’s field can be added as token. That includes setting dropdown, radio, multiselect, date, datetime, numeric, currency and other text fields.

  • Setting a textarea field

Setting a textarea is pretty similar to setting a text field, with only one difference: adding a parent’s value or calculated value also allows selecting from any parent’s textarea fields.

  • Setting a date (or datetime) field

When setting a pre-populate value for a date (or datetime) field the same 3 actions will be available: fixed value, parent value and calculated value.

Setting a fixed value allows any date (or datetime) to be set using a date picker.

Setting a parent’s value for related record’s datetime fields is limited to parent’s datetime fields. Date fields, on the other hand, can be set with parent’s date and datetime fields.

‘Calculated Value’ option provides setting a ‘formula’ that will calculate and set any date (or datetime) value on related record. You start with selecting a ‘base value’, which can be ‘Now’ or any other date field. Next you should select + or - which sets the formula to add to or deduct from the base value. Then you need to enter a number in ‘interval value’ field and select an interval (days, weeks, months, etc.).

It’s important to point out that selecting ‘Now’ as base formula value means that exact moment when action button is clicked on will be used as a base value.

image

In the example above we added a pre-populate configuration for ‘Start Date’ for a call that schedules a call in 2 days from the moment of using the action button. What this means is that if you’re on a call with client, you can easily use action button to schedule a next call.

  • Setting a dropdown field

This field type allows only ‘Fixed Value’ and ‘Parent Value’ to be set.

Setting a fixed value for a dropdown field allows choosing one option from that dropdown to be selected at the moment of creation of related record.

Setting a parent value is only possible if parent’s module has a (dropdown or radio) field that shares the same options list as related module’s field that’s being configured.

  • Setting a radio field

Similar to dropdown field, pre-populating a radio field allows only ‘Fixed Value’ and ‘Parent Value’ to be set.

Setting a fixed value allows choosing one option from the list that radio field uses to be selected at the moment of creation of related record.

Setting a parent value is only possible if parent’s module has a (dropdown or radio) field that shares the same options list as related module’s field that’s being configured.

  • Setting a multiselect field

Similar to dropdown and radio fields, pre-populating a multiselect field allows only ‘Fixed Value’ and ‘Parent Value’ to be set.

Setting a fixed value allows choosing multiple options from the list that multiselect field uses to be set at the moment of creation of related record.

Same as with dropdown and radio buttons, setting a parent value for multiselect is only possible if parent’s module has a field (dropdown, radio or multiselect) that shares the same options list as related module’s field that’s being configured.

  • Setting a checkbox field

This field type also has 2 options for pre-populating: fixed value (checked/unchecked) and parent value. Latter option allows you to pick from parent’s checkbox fields.

  • Setting an integer field

Integer field on a related record can be pre-populated in 3 ways:

  1. Fixed value-in this case we will need to provide the exact whole value that will be set to record being created

  2. Parent value-when using this option we will need to set from which field we will copy value when creating new linked record

  3. Calculated value-This option allows us to create a formula that will be used to calculate field value

This option will allow the user to combine both fixed and parent field values and apply mathematical operations to them in order to create formula

Setting a formula allows you to set a mathematical expression using parent’s integer fields (in form of tokens that’ll get the value at the time of creation of related record) along with numbers and mathematical symbols (+-*/()).

For example, to calculate percentage of closed revenue line items compared to the total number of revenue line items on the Opportunity you could write a formula like this:

{{:::field:::closed_revenue_line_items:::}} / {{:::field:::total_revenue_line_items:::}} * 100

  • Setting a decimal or float fields

Decimal field on a related record can be pre-populated in the same 3 ways as integer field can: by setting a fixed decimal value, parent’s decimal field (that’ll copy its value to related record) or by setting a calculated formula.

It’s important to notice that parent’s fields that can be set to copy their value to related record (as parent’s fields) or in formula are limited to other decimal fields, integer, float and currency fields. In other words, you can use any parent’s field of these types in formula or as parent field.

In this case we could use the same example from integer field, but this time the calculated value will not be rounded, instead it will be saved as decimal value.

  • Setting a currency field

Setting a currency field is pretty similar to setting a decimal (or float) field types, with a couple of differences.

Setting a fixed currency value allows you to also set a currency (if your system supports multiple currencies) apart from value. Also, setting a parent’s value in currency field forces you to pick only from parent’s currency fields. If you set a currency field to be pre-populated with parent’s currency field, both value and selected currency (if your system supports multiple currencies) will be set on related record that’s about to be created.

This concludes the list of actions that can be taken when action button is configured. Any configuration setting can be removed any time by clicking on ‘Remove’ button that exists at the far right of every configuration section. Don’t forget to click on ‘Save’ button after finishing configuration of an action button.

Creating action button for editing current record

As we already mentioned, action button can be configured to take one of 2 actions:

  1. Creating a record related to record you have created a button on

  2. Editing a record you have created a button on

We’ll explain the latter in more detail in the following text.

The first difference is selecting ‘Edit Current Record’ action in ‘Button Action’ dropdown when configuring a new action button. We’ll create a button for automatically completing a Task as an example. Please take a look at the following image:

The rest of configuration is the same as configuring a button for creating a related record, as explained in the chapter ‘Setting Pre-populated Values’, with the following differences:

  • The list of available fields is the list of all fields from the module you are creating a button for. Fields that can be configured by selecting fields from dropdown that follows ‘When current record is edited set following values’ label and clicking on ‘+ Update Field’ button.

  • Actions that can be taken on configured fields are ‘Fixed Value’ and ‘Calculated Value.’

  • Clicking the button opens a confirmation dialog.

image

Action buttons of this type will show up along the rest of buttons (configured for a particular module) in Time Saver field.

Editing configured action button

Every action button can be edited at any time. If you go to ‘Action Buttons’ module you’ll see the list of all already configured action buttons.

By clicking on ‘Active’ checkbox, you can configure is an action button currently active or not. If inactive, the corresponding button will simply not be shown in the ‘Time Saver’ field.

Clicking ‘Edit’ button opens up a configuration view, allowing you to add or remove fields that should be pre-populated.

‘Remove’ button deletes action button completely.

Uninstalling

Uninstalling of our Time Saver module is performed as with any other module (from ‘Module Loader’ section on Administration page). Let’s point out one more time that if you leave the module’s database table (by selecting ‘Do Not Remove Tables’ while uninstalling) you’ll save all configured buttons and they will show up when you install new (or same) module version.

Saving Comment Saving Comment...