Module Builder

Overview

Module Builder enables administrators to create, deploy, and maintain custom modules in Sugar. Modules can be created in Module Builder and then deployed within your instance of Sugar or exported for additional development and deployment to other instances of Sugar. This is convenient for testing new modules and for distributing a module to many different instances. Module Builder is available only to administrative users and these users can access the feature by going to Admin > Module Builder. This documentation will cover how to use Module Builder as well as the various actions and options available from within Module Builder.

Module Builder’s navigation is different than other modules within Sugar. Module Builder is divided into three main sections which consist of the main panel, packages panel, and footer.

Main Panel

The main panel in Module Builder is where selected information will be displayed and editable. When selecting items throughout Module Builder, they will open inside tabs within the main panel. Additional tabs can be closed by clicking the "X" in the tab.
Main_Panel_Tabs.png
The main panel also includes a breadcrumb bar showing where in
Module Builder you currently are. Select any level in the breadcrumb bar to navigate instantly to that section.
Main_Panel_Breadcrumb.png
You may also click the Left arrow to go back one page, or the Home icon to navigate to the homepage of the Developer Tools.

Packages Panel

The Packages panel is located on the left side of Module Builder and displays a list of existing packages custom modules inside those packages that are editable through Module Builder. The associated modules are grouped under a package and the fields, labels, layouts, and subpanels for each module are grouped within the module. Click the plus sign (+) preceding the package name to expand the package to see the associated items.
Packages_Panel_Expand.png
Select an item in the packages panel to load it into the main panel.

If you do not see the packages panel, it may be collapsed. Locate the gray bar on the left side of the page, and click the right arrow to expand the packages panel.
Packages_Panel_Show.png

The footer is located at the bottom of Module Builder and contains buttons to navigate to different sections of the Developer Tools.
Footer_Actions.png
The options in the footer allow you to navigate to the following locations:

Menu Item Description
Home Navigates to the home page of the Developer Tools
Studio Navigates to the home page of Studio
Module Builder Opens Module Builder to create or edit modules
Sugar Portal Editor Opens the Sugar Portal Editor to configure the Portal
Dropdown Editor Opens the Dropdown Editor to modify dropdown options

Packages

Packages can contain many different modules or different types. While packages can be useful to group similar or dependent modules together to ensure they are deployed together it is generally recommended to have a separate package for each module. This can prevent some potential headaches down the road and allows greater flexibility in the future if a module is no longer needed. In order to create a module through Module Builder, you must first create a package.

Creating Packages

Use the following steps to create a new package via Module Builder:

  1. In the Main Panel, navigate to the Home Page for Module builder and click "New Package".
    New_Package.png
  2. Enter appropriate values for the following fields:
    Package Name : The name or designation of the package. The package name is what displays in the Packages Panel and in Module Loader when installing packages.
    Author : The author who is creating the package. The author displays in Module Loader when installing packages.
    Key : The key is an alphanumeric text to distinguish modules with similar names. The system will prefix all class names, directories, and table names with this key.
    Description : A description or other information about the package.
    Readme : Click the arrows next to "readme" to open the readme field. Enter additional information about the package or modules contained in the package.
    All required fields are marked with a red asterisk and must be completed prior to saving.
  3. Once the necessary information is entered, click "Save".
    New_Package_Save.png

Deploying Packages

Packages in Module Builder can be saved and distributed via the action buttons in the main panel while viewing a package.
Deploying_Packages.png
The options allow you to perform the following operations:

Action Description
Save Click "Save" to preserve any changes to the Package Name or Author fields.
Deploy Installs the package into the current instance. Any modules in the package will be created or updated in the current instance.
Note : Any workflows, code level customizations, or changes made through Studio to the custom modules after they were deployed will be lost when redeploying. It generally is recommended to delete the module package from Module Builder after a successful deploy and use Studio to perform any additional configurations to your module to avoid this scenario.
Publish Saves the package into an installable zip file. Upload the file through Module Loader to install the package into an instance.
Export Saves the package into an importable zip file. Upload the file through Module Loader to view the package in Module Builder on a different instance where it can then be further developed and deployed.

Deleting Packages

If a package is invalid or should no longer appear in your organization’s Sugar instance, it may be deleted from Module Builder. Deleting a package will delete all files contained in the package, but will not remove the package from any instances the package was deployed to. For more information on how to uninstall a deployed package from an instance, please refer to the Module Loader documentation in the Administration guide.
Note : We recommend deleting packages from Module Builder after they have been deployed in a production instance to prevent it from accidentally being redeployed. The only exception to this rule is in a development environment as you may want to continue working and testing until you are ready to move the module to your production environment.
Use the following steps to delete a package via Module Builder:

  1. Select the desired package from the Packages panel, or the home page of Module Builder in the Main Panel.
    Deleting_Packages.png
  2. Click "Delete".
    Package_Actions_Delete.png
  3. A pop-up message will display asking for confirmation. Click "Ok" to proceed.

Modules

Modules can be created within packages through Module Builder. While you can create many different modules of different types within a package, it is generally recommended to only have one module per package. This can prevent some potential headaches down the road and allows greater flexibility in the future if a module is no longer needed.

Module Types

Module Builder comes with a few predefined module templates for creating modules. Select the module type that best fits the business use of the new module and then customize the module to further suit your needs.
The following module types are available by default in Module Builder:

Type Description
Basic Generic module with only the most basic fields defined by default. All other module types build on top of the basic module type.
Company Contains fields designed for company, account, or organization type records. Includes billing and shipping addresses, email address, phone numbers, industry, website, and more.
File Contains fields designed for file upload or document records. Includes category, expiration date, status, filename, and more.
Issue Contains fields designed for bug, issue, or case record types. Includes issue number, status, priority, work log, and more.
Person Contains fields designed for people, contacts, or lead records. Includes first and last name, primary and alternate addresses, email addresses, phone numbers, and more.
Sale Contains fields designed for sales, transactions, or opportunities. Includes, amount, currency, probability, sales stage, and more.

Module Options

When creating or modify modules in Module Builder, there are some options you can set the following options for the module:

  • Module Name : The name or designation of the module. The module name is what displays in the Packages Panel as well as in Studio after deploying.
  • Label : The name to display the module as. The label is what displays when using the module within Sugar.
  • Importing : Select this option to enable the module to allow importing records.
  • Team Security : Select this option to allow the module to be used with team security. If this option is unchecked, records in this module will not be assigned to a team and will be restricted on Role memberships only. For more information on teams and roles, please refer to the Team Management and Role Management documentations in the Administration guide.
  • Navigation Tab : Select this option to add the module and module actions to the navigation bar.
  • Type : Select the type of module to base this module off of. The module types include a template of fields that will be included in the module by default. Fields can be added and removed as necessary. You can only select the type when creating a module. For more information regarding the module types, please refer to the Module Types section in this document.

Creating Modules

While you can create many different modules of different types within a package, it is generally recommended to only have one module per package. This can prevent some potential headaches down the road and allows greater flexibility in the future if a module is no longer needed.

Creating Modules Via Package

One of the most common methods of module creation is via the New Module option in the package. This opens up the New Module screen which allows you to enter in all the relevant information for the module.
Use the following steps to create a module via the package:

  1. Select a package from the Packages Panel to create a new module in.
    Create_Module.png
  2. In the Main Panel, select "New Module".
    Create_Module_New_Module.png
  3. Enter appropriate values for the Module Options . All required fields are marked with a red asterisk and must be completed prior to saving.
  4. Once the necessary information is entered, click "Save".
    Create_Module_New_Module_Save.png

Creating Modules Via Duplication

You can also create a new module by duplicating an existing module within a package. The duplicate option is useful if the module you are creating has similar information or structure to an existing module.
Use the following steps to create a module by duplicating an existing module:

  1. Select a package from the Packages Panel to create a new module in.
    Create_Module.png
  2. In the Main Panel, select a module to duplicate.
    Create_Module_Select_Module.png
  3. Select "Duplicate".
    Create_Module_Duplicate.png
  4. The selected module is duplicated to a new module with a one appended on the end of the module name. Update the necessary fields, then click "Save".
    Create_Module_Duplicate_Save.png

Modifying Modules

Modules can be modified within a package including the associated fields, labels, layouts, and subpanels for each module. Click the plus sign (+) preceding the module name to expand the module to see the associated items.
Packages_Panel_Expand.png

Select a module in the Packages panel to load it into the main panel. From here you can modify the Module Options for the selected module.

Modifying Labels

Labels are used throughout Sugar for items like buttons, field headers, subpanel titles, error messages, and more. To modify the labels for a module, select "Labels" from the packages panel under the desired module.
Packages_Panel_Labels.png
The Labels tab will open up in the main panel. Here you can specify labels for all language packs currently installed. Select the desired language from the dropdown to view and modify the labels for that language.
Modify_Labels_Language.png
Modify the labels for the selected language and click "Save" to save your changes.

Modify_Labels_Save.png

Fields

The fields section in Module Builder allows administrators to create new fields as well as change properties on existing fields within a module. To access the fields section in Module Builder, select "Fields" from the packages panel under the desired module.
Packages_Panel_Fields.png
The Fields tab will open up in the main panel.

Field Types

Sugar comes with many different types of fields to cover a variety of abilities. Each data type has certain options and properties to configure. The following fields are available to be added to modules in Module Builder:

Data Type Description
Address Creates fields for street, city, postalcode, state, and country.
Note : Custom address fields cannot be grouped together like the stock address fields.
Checkbox Creates a checkbox for data fields with a Yes/No action.
Currency Creates a field to enter a currency value. The system automatically creates a dropdown of the currency type if the field does not already exist in that module.
Date Creates a field to enter a date. Includes a button for a calendar popup.
DateTime Creates a field to enter the date and time. Includes a button for a calendar popup as well as dropdowns for the time.
Decimal Creates a field to hold a number rounded to a specified decimal precision. Sugar stores the exact representation of the number in the database (e.g. For a precision of 2: 1.236 is stored as 1.24).
DropDown Creates a field that you can associate with a dropdown list of values.
Encrypt Creates a field for sensitive information, such as social security numbers, whose value is to be encrypted in the Sugar database. The value is encrypted in the database but is visible in the user interface to users.
Float Creates a field to hold a number rounded to a specified decimal precision. Sugar stores the value differently based on the database platform Sugar is running on.
HTML Creates static HTML-formatted text to display in record views.
IFrame Creates a field to store or generate a URL to display an iFrame in record views.
Image Creates an image field to upload an image to display on a record.
Integer Creates a field to specify positive or negative numbers with no decimal places.
MultiSelect Creates a dropdown list of values where multiple values can be selected.
Flex Relate Creates a dropdown list from which you can relate a single record from a variety of modules. Only one Flex Relate field is allowed per module. If the module already has a Flex Relate field, this option does not display in the Data Type dropdown list.
Phone Creates a field to enter a phone number.
Radio Creates a radio button for a user to select one value from a dropdown list.
Relate Creates a field to associate a record with another module’s record as a one-way relationship. You can add multiple Relate fields to a module.
Note : Relate fields and custom relationships are independent of each other. Changes made to either one are not reflected in the other. Relate fields can be added to a report, but any data on the related record cannot be accessed in the report. To access related record data in a report you will need to create a custom relationship.
TextArea Creates a large field for multiple lines of text.
TextField Creates a field for a single line of text.
URL Creates a field to store or generate a URL and displays as a link.
Field Options

Fields provide ways to store different data types in Sugar. While many fields come with Sugar by default, there can be instances where your organization needs to store additional data.
When creating or modifying fields through Module Builder, there are some properties that exist across all field types, and there are some that are unique to only a few types. The following properties and options are available in Sugar:

  • Audit : Select this checkbox to log when this field is changed per record. Users can view the audit via "View Change Log" from the detail view.
    The Audit option is available for all data type fields.
  • Border : Select this checkbox to add a border around the image for this field.
    The Border option is only available for Image data type fields.
  • Calculated Value : Select this checkbox to designate this field as a calculated field. This opens up the Formula option and disables the Default Value and Importable options. For more information regarding entering a formula for a calculated value, please refer to the Formula option listed in this section.
    Fields_Calculated.png
    The result of the formula will be entered into the field for any new or modified records. When selecting this option, the field value cannot be modified by users.
    The Calculated Value option is only available for the following data type fields:
    Checkbox Currency
    Date Datetime
    Decimal Encrypt
    Float Integer
    Phone TextArea
    TextField
  • Columns : Enter the number of columns to specify the width of a TextArea data type field.
    The Columns option is only available for TextArea data type fields.
  • Comment Text : Enter comments or documentation about the field. Only viewable through Module Builder and Studio.
    The Comment Text option is available for all data type fields except Flex Relate.
  • Default Value : Specify or select a default value for this field when a record is created. Default values for the record are populated by default on the edit view layout, but can be modified by users.
    The Default Value option is available for all data type fields except HTML, Image, Flex Relate, and Relate.
  • Dependent : Select this option to designate this field as being dependent on a formula or a parent dropdown. For DropDown data type fields you can select "Parent Dropdown" or "Formula" for the dependency.
    Fields_DD_Dependent.png
    Selecting "Parent Dropdown" will open the Parent Dropdown option listed below. Selecting "Formula" will open the Visible If option. For other field data types, select the Dependent checkbox to open the Visible If option. For more information regarding entering a formula to make a dependent field visible, please refer to the Visible If option listed in this section.
    Fields_Dependent.png
    The Dependent option is available for all data type fields except Address.
  • Disable Format : Select this checkbox to disable number formatting such as the thousands separator.
    The Disable Format option is only available for Integer data type fields.
  • Display Label : Enter a value to display as the field label and header in layouts. This value is also modifiable in the packages panel under Labels . Defaults to the Field Name entered.
    The Display Label option is available for all data type fields except Flex Relate. Flex Relate uses the Label Value option.
  • Drop Down List : Select a list of values to use for the field. Only values in the list will be available to be selected for the field. Click "Edit" to change the values for the currently selected list, or click "Add" to create a new list.
    Fields_Dropdown_List.png
    The Drop Down List option is only available for the following data type fields:
    DropDown MultiSelect
    Radio
    For more information on editing dropdown values via the Dropdown Editor, please refer to the Editing Dropdown Lists section of the Developer Tools documentation in the Administration guide.
  • Duplicate Merge : Select one of the following options to determine the field’s functionality when records are being merged:
    • Disabled : Selected by default. The field will not appear in the Merge Duplicates feature, and will not be available to use for the filter conditions in the Find Duplicates feature.
    • Enabled : The field will appear in the Merge Duplicates feature, but will not be available to use for the filter conditions in the Find Duplicates feature.
    • In Filter : The field will appear in the Merge Duplicates feature, and will also be available in the Find Duplicates feature.
    • Default Selected Filter : The field will be used for a filter condition by default in the Find Duplicates page, and will also appear in the Merge Duplicates feature.
    • Filter Only : The field will not appear in the Merge Duplicates feature, but will be available in the Find Duplicates feature.
      The Duplicate Merge option is available for all data type fields except Image.
  • Enable Range Search : Select this checkbox to allow range searches to be performed on this field. For more information on how to use ranged searches, please refer to the Advanced Search section of the Search documentation in the Application guide.
    The Enable Range Search option is only available for the following data type fields:
    Currency Date
    Datetime Float
    Integer
  • Field Name : Enter in the name of the field being created. Once a field has been created the field name cannot be changed. Field names can contain only alphanumeric characters as well as the underscore character.
    The Field Name option is required for all data type fields.
  • Full Text Searchable : Select a boost level for indexing this field for Full Text Searching. Disabled indicates the field will not be indexed by the Full Text engine. Fields with a higher boost level will be given greater weight when a search is performed, making the matching values appear higher in the search results. If you change the boost level for a field from one level to another, be sure to perform a system index deleting the existing data to apply the change.
    For more information regarding Full Text Search, please refer to the Search documentation in the Application guide.
    The Full Text Searchable option is only available when Full Text is enabled and for the following data type fields:
    Decimal Float
    Integer TextArea
    URL TextField
  • Formula : Contains the current formula to return a calculated value. Click "Edit Formula" to launch the formula builder to change the formula.
    Fields_Calculated_Formula.png
    For more information on how to build a formula using the formula builder, please refer to the Using Sugar Logic section in this document.
    The Formula option is only available when the Calculated Value option is selected.
  • Generate URL : Select this checkbox to allow variables from the current module to be placed into the Default Value option for creating dynamic URLs. This is useful for providing links or iFrames to internal systems such as an ERP or to external systems such as Google Maps.
    Fields_Generate_URL.png
    Select the desired field to add from the dropdown and click "Insert Field" to add the field to the Default Value. When selecting this option, the field value cannot be modified by users.
    The Generate URL option is only available for the following data type fields:
    IFrame URL
  • Height : Enter the number of pixels to vertically scale the image for this field. Enter only the Width or Height options to retain the aspect ratio of the image.
    The Height option is only available for Image data type fields.
  • Help Text : Enter in basic instructions for populating this field. The text entered here will display to users when they hover their mouse over this field in the edit view.
    The Help Text option is available for all data type fields.
  • HTML : Enter in static rich text with formatting or HTML code to display on a record.
    Fields_HTML.png
    For more information on how to use the text editor please refer to the TinyMCE section of the User Interface document in the Application guide.
    The HTML option is only available for HTML data type fields.
  • IFrame Height : Enter the number of pixels for the height of the IFrame field. The width of the IFrame field is always the width of the field container.
    The IFrame Height option is only available for IFrame data type fields.
  • Importable : Select one of the following options to determine the field’s functionality when records are being imported:
    • Yes : The field can be included in an import operation.
    • No : The field cannot be included in an import.
    • Required : A value for the field must be provided in any import.
  • Label Value : Enter a value to display as the field label and header in layouts. This value is also modifiable in the packages panel under Labels . Defaults to "Flex Relate".
    The Label Value option is only available for Flex Relate data type fields.
  • Mass Update : Select this checkbox to add this field as an option to mass update.
    The Mass Update option is only available for the following data type fields:
    Date Datetime
    DropDown MultiSelect
    Radio
  • Max Size : Enter the maximum amount of characters allowed for this field. Defaults to 255.
    The Max Size option is only available for the following data type fields:
    Address Decimal
    Float IFrame
    Integer Phone
    URL TextField
  • Max Value : Enter the highest value allowable for this field. If a user attempts to enter a value for this field higher than what is specified here, they will get a prompt showing the range of acceptable values.
    The Max Value option is only available for Integer data type fields.
  • Min Value : Enter the lowest value allowable for this field. If a user attempts to enter a value for this field lower than what is specified here, they will get a prompt showing the range of acceptable values.
    The Min Value option is only available for Integer data type fields.
  • Module : Select a module from the dropdown to relate the current module to. A module can relate back to itself, a good example of this would be a relate field on Contacts to relate back to Contacts for a referred by field. This will allow users to select which contact record referred a different contact. The module cannot be modified after creation.
    Fields_Module.png
    The Module option is only available for Relate data type fields.
  • Open Link In : Select one of the following options to determine how a URL will open:
    • New Window : Opens the URL in a new Tab or Window depending on your browser and settings.
    • Same Window : Opens the URL in the same window as the record you are currently browsing.
      The Open Link In option is only available for URL data type fields.
  • Parent Dropdown : Select an option from the dropdown to specify the parent that controls the visibility of this dropdown field. The Parent Dropdown option is populated with the other dropdown data type fields in the current module.
    Fields_Parent_Dropdown.png
    Click "Edit Visibility" to specify which options are available from the current dropdown for each value of the parent dropdown. In the Visibility Editor window, drag values from the current dropdown list to the value sections of the parent dropdown.
    Fields_Parent_Dropdown_Visibility_1.png
    This will determine which options in the dropdown list are available when the parent dropdown is set to the specified value. In this example, if the parent dropdown is set to "Apparel", then the current dropdown will have options 1, 2, and 3 where if the parent dropdown is set to "Banking", then the current dropdown will only have options 2 and 3 available. If there are no available options for a parent dropdown value, then the dropdown will not be visible at all. To remove an item, drag it from the value to the Trash bin on the left. Once the values are set, click "Save" to commit your changes.
    Fields_Parent_Dropdown_Visibility_Save_1.png
    The Parent Dropdown option is only available when the Dependent option has "Parent Dropdown" selected.
  • Precision : Enter a number to specify the number of digits to the right of the decimal point the value should be stored as.
    The Precision option is only available for the following data type fields:
    Decimal Float
  • Reportable : Select this checkbox to allow this field to be used in reports.
    The Reportable option is available for all data type fields except Encrypt, Flex Relate, HTML, IFrame, Image.
  • Required Field : Select this checkbox to make the field required to be populated before saving a record. The user will be prompted to enter a non-blank value for the field upon saving.
    The Reportable option is available for all data type fields except Checkbox and HTML.
  • Rows : Enter the number of rows to specify the height of a TextArea data type field.
    The Rows option is only available for TextArea data type fields.
  • System Label : Enter the system value for storing the label of the field. This is defaulted to the name of the field preceded with "LBL_". Any lowercase characters entered will be converted to uppercase upon saving. Once the field has been created the system label cannot be changed.
    Note : It is recommended to avoid naming multiple fields the same System Label as they will then all share the same label and header value in layouts.
    The System Label option is available for all data type fields.
  • Visible If : Contains the current formula to determine if a field is visible on the layout or not. Click "Edit Formula" to launch the formula builder to change the formula.
    Fields_Visible_If.png
    The formula must result in a Boolean (true/false) response. For more information on how to build a formula using the formula builder, please refer to the Using Sugar Logic section in this document.
    The Visible If option is only available when the Dependent option is checked or "Formula" is selected from the dropdown.
  • Width : Enter the number of pixels to horizontally scale the image for this field. Enter only the Width or Height options to retain the aspect ratio of the image.
    The Width option is only available for Image data type fields.
Creating Fields
Use the following steps to create a new field via Module Builder:
  1. Expand out the tree under the desired module in the Packages Panel, and select "Fields".
    Packages_Panel_Fields.png
  2. In the Main Panel, click "Add Field".
    Fields_Add_Field.png
  3. Enter appropriate values for the Field Options . Field Name is required.
  4. Once the necessary information is entered, click "Save".
    Fields_Add_Field_Save.png
  5. After creating a field it must be placed on the edit layout before users will be able to enter data into that field. For more information on editing layouts, please refer to the Editing Layouts section in this document.
Editing Fields
Use the following steps to edit an existing field via Module Builder:
  1. Expand out the tree under the desired module in the Packages Panel, and select "Fields".
    Packages_Panel_Fields.png
  2. In the Main Panel, select a field to edit. Click the column headers to sort the grid by different columns to assist in locating the field.
    Fields_Edit_Field.png
    Note : Fields created via Module Builder will show with an asterisks next to their names.
  3. Enter appropriate values for the Field Options .
  4. Once the necessary information is entered, click "Save".
    Fields_Edit_Field_Save.png
Deleting Fields
Use the following steps to delete an existing field via Module Builder:
  1. Expand out the tree under the desired module in the Packages Panel, and select "Fields".
    Packages_Panel_Fields.png
  2. In the Main Panel, select a field to delete. Click the column headers to sort the grid by different columns to assist in locating the field.
    Fields_Edit_Field.png
    Note : Fields created via Module Builder will show with an asterisks next to their names. Fields added by the module type template cannot be deleted.
  3. Select "Delete".
    Fields_Edit_Field_Delete.png
  4. A pop-up message will display asking for confirmation. Click "Ok" to proceed.
    Before deleting a field please verify and resolve the following issues:
    1. Field must be removed from any report filters or displays.
    2. Field must be removed from any workflows that filters or displays the field.
    3. Field must be removed from any dashlet that filters or displays the field.
    4. Field must be removed from any Sugar Logic formulas.
    5. Field must be removed from any email templates.
    6. Field must be removed from any saved searches.
  5. The field will automatically be removed from any module layouts when deleted.
    Note : When deleting fields in a module and redeploying the package, the data related to the field in the database will not be removed.
Cloning Fields
Use the following steps to clone an existing field via Module Builder:
  1. Expand out the tree under the desired module in the Packages Panel, and select "Fields".
    Packages_Panel_Fields.png
  2. In the Main Panel, select a field to delete. Click the column headers to sort the grid by different columns to assist in locating the field.
    Fields_Edit_Field.png
    Note : Fields created via Module Builder will show with an asterisks next to their names.
  3. Select "Clone"
    Fields_Edit_Field_Clone.png
    Note : Some non-standard stock fields (e.g. Name) do not have the ability to clone.
  4. Enter appropriate values for the Field Options .
  5. Once the necessary information is entered, click "Save".
    Fields_Clone_Save.png

Relationships

Relationships define the links between different modules in Sugar and allow records between those modules to be related. Related records display in fields or subpanels on a module’s detail page depending on the relationship type. When you create a new relationship between two modules, the system automatically creates the necessary subpanels, related fields, and metadata relationships. Relationships provide the added benefit in reports to allow access to a related records fields in addition to the base module’s fields.
The relationships section in Module Builder allows administrators to create new relationships between custom and stock modules as well as change some properties on existing relationships. To access the relationship section in Module Builder, select "Relationships" from the packages panel under the desired module.
Packages_Panel_Relationships.png
The module’s relationship tab will open up in the main panel.

Note : Any relationships created through Module Builder will not be able to be deleted in Studio after being deployed. It is recommended to create realtionships in Studio after deploying instead of via Module Builder provided you follow the best practices of never redeploying a module from Module Builder.

Relationship Types

Sugar contains a few different types of relationships you can create between modules. The relationship type will determine what fields or tables will be created in the database as well as what interface the user will see to manage the relationship.
The following relationship types are available in Module Builder:

  • One to One : Records in the primary module and the related module are uniquely related to each other. For a One to One relationship between Accounts and Contacts, an account can be associated with only one contact and a contact can be associated with only one account. The relationship will show as a field in each module’s detail view where changing the relationship from either module will also change the value in the other module.
    From the Primary Module Account :
    Relationships_One_To_One_From_Account.png
    From the Related Module Contact :
    Relationships_One_To_One_From_Contact.png
    Note : You can create a one way relationship between modules using relate fields. For more information regard relate fields, please refer to the Field Types section in this document.
  • One to Many : Records in the primary module can have relationships with many records in the related module. For a One to Many relationship between Accounts and Contacts, an account can be associated with many contacts, but each contact can be associated with only one account. The detail view of the primary module will display a subpanel for the related module, and the detail view of the related module will display a field containing a link to the related record.
    From the Primary Module Account :
    Relationships_One_To_Many_From_Account.png
    From a Related Module Contact :
    Relationships_One_To_Many_From_Contact.png
    Note : A One to Many relationship is the same as a Many to One relationship except the Primary and Related modules are reversed.
  • Many to Many : Records in both the primary module and the related module can have multiple records related in each module. For a Many to Many relationship between Accounts and Contacts, an account can be associated with many contacts, and a contact can be associated with many accounts. Both module’s detail views will display a subpanel for the opposite module.
    From the Primary Module Account :
    Relationships_Many_To_Many_From_Account.png
    From a Related Module Contact :
    Relationships_Many_To_Many_From_Contact.png
    Note : Only modules with subpanels available can be on the "Many" side of a relationship. For example, the Product Catalog module lacks a subpanel; therefore, Product Catalog can only be selected on the "One" side of a relationship.

When you create a relationship for a module, the selected module is considered to be the primary module and the module that you relate it with is the related module.
You can also create a relationship between a module and itself. In this case, the relationship becomes a parent-child relationship. For example, you can create a relationship from Accounts to Accounts in order to create sub-accounts within the primary account.

Creating Relationships

Use the following steps to create a new relationship via Module Builder:

  1. Expand out the tree under the desired module in the Packages Panel, and select "Relationships".
    Packages_Panel_Relationships.png
  2. In the Main Panel, click "Add Relationship".
    Relationships_Add_Relationship.png
  3. Enter appropriate values for the following options:
    Type : Select the type of relationship to create from the options in the Relationship Types section.
    Module : The Primary module is set to the module you are adding the relationship to. Select the Related module from the dropdown. The Primary and Related module can be the same in order to create a parent child relationship.
    Label : Enter a label to reference the Primary module or Related module’s subpanels for this relationship. This option is only available for the "Many" side of a relationship.
    Subpanel from : Select a subpanel option to display the Primary or Related module’s records in. This will determine the fields displayed in the subpanel. This option is only available for the "Many" side of a relationship.
  4. Once the necessary information is entered, click "Save".
    Relationships_Add_Relationship_Save.png
  5. The required fields and subpanels are instantly created and saved in the package.
Editing Relationships

Use the following steps to edit a relationship via Module Builder:

  1. Expand out the tree under the desired module in the Packages Panel, and select "Relationships".
    Packages_Panel_Relationships.png
  2. In the Main Panel, select a relationship to edit. Click the column headers to sort the grid by different columns to assist in locating the relationship.
    Relationships_Select_Relationship.png
  3. The only field modifiable on a relationship is the Label field for naming the Primary or Related modules subpanels. This option is only available for the "Many" side of a relationship.
  4. Once the necessary information for the Label field is entered, click "Save".
    Relationships_Edit_Relationship_Save.png
Deleting Relationships

Use the following steps to delete a relationship via Module Builder:

  1. Expand out the tree under the desired module in the Packages Panel, and select "Relationships".
    Packages_Panel_Relationships.png
  2. In the Main Panel, select a relationship to delete. Click the column headers to sort the grid by different columns to assist in locating the relationship.
    Relationships_Select_Relationship.png
  3. Select "Delete".
    Relationships_Edit_Relationship_Delete.png
  4. A pop-up message will display asking for confirmation. Click "Yes" to proceed. If you would like to retain the data and table structure that currently exists for the relationship, select the "Do Not Remove Tables" option.
    Relationships_Edit_Relationship_Delete_Confirm.png
    Note : Leaving the "Do Not Remove Tables" unchecked will delete the relationship data and remove the tables for the relationship from the database when the package is installed.

Note : Before deleting a relationship please verify and resolve the following issues:

  1. Relationship must be removed from any report filters or displays.
  2. Relationship must be removed from any workflows that filters or displays fields from the relationship.
  3. Relationship must be removed from any Sugar Logic formulas referencing the relationship.

Layouts

Layouts are used to represent many screens in Sugar. The layouts section in Module Builder allows administrators to add fields and configure layouts. To access the layouts section, expand "Layouts" from the packages panel under the desired module.
Packages_Panel_Layouts.png
The available layouts for the selected module will appear.
Layout Types

Sugar comes with different types of layouts to represent different sections of Sugar. Not all layouts are available in every module. The following layouts are available in Sugar:

  • Edit View : Edit view layout is used in Sugar to modify or create records in the specified module.
  • Detail View : Detail view is used in Sugar to view the current data for a record within the specified module.
  • List View : List view layout is used in Sugar to view multiple records within the specified module. The list view is also used for displaying the results from a Basic or Advanced search.
  • Quick Create : Quick Create layout is used in Sugar to quickly view, edit, or modify records within the specified module via a popup window, which avoids navigating away from the current page. The quick create layout for a module can be accessed from many different locations throughout Sugar, including other modules.
    Quick_Create_Layout.png
  • Sugar Dashlet List View : Sugar dashlet list view layout is used in Sugar to view multiple records in the dashlet for the specified module. This section allows administrators to include specific fields by default to dashlets, and allow other fields to be added by users to personalize their dashlet.
    Dashlet_List_View_Layout.png
  • Sugar Dashlet Search : Sugar dashlet search layout is used in Sugar to filter records in the dashlet for the specified module.
    Dashlet_Search_Layout.png
  • Popup List View : Popup list view layout is used in Sugar to view multiple records in a popup window used to locate and select records in the specified module.
    Popup_List_View_Layout.png
  • Popup Search : Popup search layout is used in Sugar to allow users to search on records in the popup window used to select records in the specified module.
    Popup_Search_Layout.png
  • Basic Search : Basic search layout is used in Sugar to allow users to search on records in the basic search section on the list view of the specified module.
    Basic_Search_Layout.png
  • Advanced Search : Advanced search layout is used in Sugar to allow users to search on records in the advanced search section on the list view of the specified module.
    Advanced_Search_Layout.png
Layout Options

Layouts in Sugar have more options than just positioning of fields. The following are some of the options Sugar administrators have when configuring layouts throughout Module Builder:

  • Panels : Every field on a layout is contained within a panel. Panels can be open or collapsed by default and have a title defining the panel. Panels can be organized to contain groups of similar or related fields to assist in organization.
    Select the Pencil icon next to the Panel title to modify the title. Select the Collapsed? checkbox to default the panel as collapsed. Users can open and close panels as the wish.
    Layout_Panel_Options.png
    Note : The default panel name cannot be modified in Module Builder.
  • Tabs : Panels can be displayed as Tabs inside a layout. You can also have panels nested inside of tab defined panels. Select "Tab" from the Display Type dropdown to display the panel as a tab.
    Layout_Panel_Options_Tab.png
    Every panel listed underneath a Tab display type will be a panel within the tab until the next Tab display type panel is reached. For example, set the panels in the Accounts edit view layout to the following:
    Panel Title Display Type
    Overview Tab
    More Information Tab
    Other Panel

    This will display two tabs, Overview and More Information and the Other panel and it’s contents will reside in the More Information tab.
    Layout_Panel_Options_Tab_Example.png

  • Layout History : Sugar keeps a history of the changes made to each layout. These changes and when they occurred can be viewed and restored via "View History". For more information on viewing the history of layouts, please refer to the Viewing Layout History section of this documentation.
  • Restore Defaults : Sugar also contains the ability to restore a layout to it’s original default configuration. For more information on how to reset a layout to default, please refer to the Restoring Layout Defaults section in this documentation.
  • Sync and Copy Layouts : Edit view layouts can by synced with detail view layouts to ensure the same fields exist in the same positions on both layouts. Alternately, the detail view and quick create layouts can be copied from the edit view layout. For more information on Syncing and Copying layouts, please refer to the section Sync And Copy below.
Sync And Copy
Sugar provides administrators with the ability to sync and copy certain layouts to assist in configuring layouts. Often it makes sense for a module’s edit view and detail view layouts to be identical. Instead of having to duplicate any changes made to one layout, administrators can configure the detail view layout to be synced to the edit view layout.
To sync the layouts, select the Sync to DetailView checkbox on the edit view layout and click "Save".
Layout_Options_Sync.png
The current detail view layout will be replaced with the current edit view layout. At this point, changes cannot be made to the detail view layout, but any changes made to the edit view will by automatically synced to the detail view when saved.
Alternatively to syncing the layouts, administrators can copy the layout from the edit view to the detail view or the quick create layouts. This is especially useful if you want the layouts to be similar, but different. Make any changes necessary to the edit view layout, and then navigate to either the detail view or quick create layouts. Select "Copy from EditView" to replace the current layout with the details from the edit view.
Layout_Options_Copy.png
You can then continue to edit the layout as you wish.
Note : The copy feature is a one time copy of the layouts. Any future changes to the edit view layout will not be reflected on the layout copied to without performing the copy again.
Editing Layouts

Use the following steps to edit a layout via Module Builder:

  1. Expand "Layouts" from the Package Panel under the desired module, and select the layout you wish to edit.
    Packages_Panel_Layouts.png
    The selected layout will display in the Main Panel.
  2. Optionally set and configure the Layout Options or perform the following actions to edit the layout:
    Remove a Field from the Layout : Drag a field from the layout to the trash bin in the toolbox to remove the field from the layout.
    Layout_Edit_Layout_Remove_Field.png
    You may remove rows and panels through the same method.
    Expand or shrink the size of a Field : Click the plus icon (+) to expand a field to take both columns in the layout or click the minus icon (-) to shrink a field to only take one column.
    Layout_Edit_Layout_Expand_Shrink_Field.png
    Areas with no field in its location will be referenced with the label "(filler)".
    Add a Field : Drag a field from the list of fields in the Toolbox to an empty location containing the "(filler)" label to add the field to the layout in that location.
    Layout_Edit_Layout_Add_Field.png
    You can also drag a field from the list of fields in the Toolbox to a location that already has a field in it. The current field will automatically be moved to the Toolbox, and will be replace on the layout with the field being dragged.
    Add a Row : Drag the "New Row" item in the Toolbox into a panel of the layout to add a new row of empty locations to the layout.
    Layout_Edit_Layout_Add_Row.png
    Add a Panel : Drag the "New Panel" item in the Toolbox into a section of the layout to add a new panel to the layout.
    Layout_Edit_Layout_Add_Panel.png
  3. Once the necessary information for the layout has been configured, click "Save" to preserve your changes.
    Layout_Edit_Layout_Save.png

Some layouts in Sugar are configurable from a positional layout perspective, but some are more a list of available fields. Some examples of these types of layouts are list view, basic, and advanced search. Many of these layout types can be personalized for each user to display and hide certain fields. The list view type of layouts can contain up to three of the following sections to group fields into:

  • Default : Default fields are the fields that will show by default in the layout.
  • Available : Available fields are fields that will not show by default in the layout, but if the layout can be personalized, users can add these fields to their view of the layout. Not all list type layouts have an available fields section.
  • Hidden : Hidden fields are fields that will not show in the layout and cannot be personalized to be added to their view of the layout.

Drag fields between these sections to set them accordingly.
Layout_Edit_Layout_List_Drag.png
Click the Pencil icon to modify the label of the field as well as the width percentage the field will take up in the list.
Layout_Edit_Layout_List_Edit.png
Edit the label or width percentage, and click "Save" to continue.
Note : Editing a field label on ListView layout will change that field’s label in all ListView layouts.
Layout_Edit_Layout_List_Edit_Save.png
Click "Save" to preserve your changes to the package.
Layout_Edit_Layout_List_Save.png

Mobile Layouts

Mobile layouts are used to represent the screens in SugarCRM Mobile. The mobile layouts section in Module Builder allows administrators to add fields and configure mobile layouts. To access the mobile layouts section in Module Builder, expand "Mobile Layouts" from the Packages Panel under the desired module.
Packages_Panel_Mobile.png
The available mobile layouts for the selected module will appear.
Note : Changes here will not modify layouts in the Sugar Mobile Plus application.
Mobile Layout Types

Sugar comes with different types of mobile layouts to represent different sections of the mobile applications. Not all layouts are available in every module and the different mobile applications will use the information defined here differently. The following mobile layouts are available in Sugar:

  • Edit View : Edit view layout is used in Sugar to modify or create records in the specified module.
  • Detail View : Detail view is used in Sugar to view the current data for a record within the specified module. Certain fields are translated to SugarCRM Mobile as buttons instead of data. For example, instead of seeing the phone number, there is a phone icon to be able to call the number on the record.
  • List View : List view layout is used in Sugar to view multiple records within the specified module. Only the first two fields in the list view section will be displayed in SugarCRM Mobile.
  • Search : Search layout is used in Sugar to allow users to search on records in the specified module. This layout is not utilized by SugarCRM Mobile since that application fully utilizes your instance’s full text search settings to generate results.
Mobile Layout Options

Mobile layouts in Sugar have more options than just positioning of fields. The following are some of the options Sugar administrators have when configuring mobile layouts throughout Module Builder:

  • Layout History : Sugar keeps a history of the changes made to each layout. These changes and why they occurred can be viewed and restored via "View History". For more information on viewing the history of layouts, please refer to the Viewing Layout History section of this documentation.
  • Restore Defaults : Sugar also contains the ability to restore a layout to it’s original default configuration. For more information on how to reset a layout to default, please refer to the Restoring Layout Defaults section in this documentation.
Modifying Mobile Layouts

Use the following steps to edit a mobile layout via Module Builder:

  1. Expand "Mobile Layouts" from the Packages Panel under the desired module, and select the layout you wish to edit.
    Packages_Panel_Mobile.png
    The selected mobile layout will display in the Main Panel.
  2. Optionally set and configure the Mobile Layout Options or perform the following actions to edit the layout:
    Remove a Field from the Layout : Drag a field from the layout to the trash bin in the toolbox to remove the field from the layout. You may remove rows through the same method.
    Areas with no field in its location will be referenced with the label "(filler)".
    Add a Field to the layout: Drag a field from the list of fields in the Toolbox to an empty location containing the "(filler)" label to add the field to the layout in that location.
    You can also drag a field from the list of fields in the Toolbox to a location that already has a field in it. The current field will automatically be moved to the Toolbox, and will be replace on the layout with the field being dragged.
    Add a Row to the Layout : Drag the "New Row" item in the Toolbox into a panel of the layout to add a new row with an empty location to the layout.
  3. Once the necessary information for the layout has been configured, click "Save" to preserve your changes.
    Mobile_Layouts_Save.png

Some layouts in Sugar are configurable from a positional layout perspective, but some are more a list of available fields. Examples of these types of layouts are mobile list view and mobile search. Many of these layout types can be personalized for each user to display and hide certain fields. The list view type of layouts can contain up to three of the following sections to group fields into:

  • Default : Default fields are the fields that will show by default in the layout.
  • Available : Available fields are fields that will not show by default in the layout, but if the layout can be personalized, users can add these fields to their view of the layout. Not all list type layouts have an available fields section.
  • Hidden : Hidden fields are fields that will not show in the layout and cannot be personalized to be added to their view of the layout.

Drag fields between these sections to set them accordingly. Click the Pencil icon to modify the label of the field. Edit the label and click "Save" to continue.
Note : Editing a field label on ListView layout will change that field’s label in all ListView layouts.

Available Subpanels

Related records between modules in Sugar are commonly displayed in Subpanels. Similar to list type layouts, administrators can modify the available subpanel layouts to change which fields are shown in a module’s subpanel. You can add or remove fields for these subpanels depending on the information that you want to display to users. To access the subpanels section in Module Builder, expand "Available Subpanels" from the Packages Panel under the desired module.
Packages_Panel_Available_Subpanels.png
The available subpanels for the selected module will appear.

Subpanel Options

Subpanels in Sugar have more options than just positioning of fields. The following are some of the options Sugar administrators have when configuring subpanels throughout Module Builder:

  • Layout History : Sugar keeps a history of the changes made to each subpanel. These changes and when they occurred can be viewed and restored via "View History". For more information on viewing the history of subpanels, please refer to the Viewing Layout History section of this documentation.
  • Restore Defaults : Sugar also contains the ability to restore a subpanel to it’s original default configuration. For more information on how to reset a subpanel to default, please refer to the Restoring Layout Defaults section in this documentation.

Modules_Panel_Subpanels.png

Modifying Subpanels

Use the following steps to modify a subpanel via Module Builder:

  1. Expand "Available Subpanels" from the Packages Panel under the desired module, and select the subpanel you wish to edit.
    Packages_Panel_Available_Subpanels.png
    The selected subpanel will display in the Main Panel.
  2. Optionally set and configure the Subpanel Options or perform the following actions to edit the subpanel:
    Remove a Field : Drag a field from the Default panel to the Hidden panel to remove it from the subpanel.
    Subpanels_Edit_Remove_Field.png
    Add a Field : Drag a field from the Hidden panel to the Default panel to add it to the subpanel.
    Subpanels_Edit_Add_Field.png
    Change Field Order : Drag a field up and down in the Default list to move its position left and right in the subpanel.
    Edit a Field’s Width : Click the Pencil icon to change the percentage width of the field in the subpanel.
    Subpanels_Edit_Field_Width.png
    Enter in the width percentage and click "Save" to continue.
    Subpanels_Edit_Field_Width_Save.png
  3. Once the necessary information for the subpanel has been configured, click "Save" to preserve your changes.
    Subpanels_Edit_Save.png

Using Sugar Logic

Sugar Logic allows Sugar administrators to write simple formulas and logic checks to provide a calculation for a field or to set the visibility of a field. A formula specifies one or more field values along with operators and functions that are mathematical or logical. When you execute a formula, Sugar performs the calculation to derive the value. When a field is used in a formula, Sugar recalculates the value whenever a user updates it and saves the record. Similarly, if you update a formula, Sugar recalculates the field value based on the updated formula.
For more information regarding the types of fields you can use Sugar Logic in, please refer to the Field Options section in this documentation.
Administrators can access the formula builder for the fields and options that accept formulas by selecting "Edit Formula".
Fields_Calculated_Formula.png

Functions

Functions are listed on the bottom left hand corner of the formula builder and provide a variety of calculations, logic checks, and formatting options. To locate the function you need, you can scroll through the list or enter search criteria to narrow the list.
Logic_Functions_Search.png
To see how to use a function and what the function does, simply hover over the function to view the syntax, parameters, and a brief description of what the function does.
Logic_Functions_Hover.png
The function name is followed by a comma-separated list of parameters to the function. The list specifies the data type expected for each parameter. For example, the function daysUntill expects one parameter of Date type.
The brief description in the hover text will typically specify what data type is being returned, but if it does not, you can determine the data type being returned via the icon to the right of the function in the grid.
Logic_Functions_Return_Data_Type.png
The following is a list of the possible return type symbols and what they stand for:

Symbol Description
# Returns a Number
Calendar Returns a Date object with a date and time
% Returns a Boolean (true or false) value
A Returns Text
[ ] Returns a List
? Returns a variable data type that could be any of the above
Functions are defined to either accept a set number of parameters or have an undetermined amount of parameters. Many function parameters require a specific data type to be passed in for the function to work. Functions can be nested matching up the return data type of the function to the parameter data type of a different function. The following functions and their parameters (multiple parameters are indicated with "…") are available in Sugar:
Function Description Parameters Return Type
abs Returns the absolute value of $param1. Number $param1 Number
add Returns the sum of the given parameters. Number $param1, … Number
addDays Returns $date moved forward or backwards by $days. Date $date, Number $days Date
and Returns true if and only if all given parameters are true. Boolean $param1, … Boolean
average Returns the average of the given parameters. Number $param1, … Number
ceil Returns $param1 rounded up to the next integer. Number $param1 Number
concat Returns all of the given parameters appended together in the order passed. String $param1, … Text
contains Returns true if $needle is within $haystack. String $haystack, String $needle Boolean
count Returns the number of records related to this record by $module Relate $module Number
createList Returns a List of the given parameters. Generic $param1, … List
date Returns $param1 as a Date object. String $param1 Date
dayofweek Returns the number of the day of week that $param1 falls on. Date $param1 Number
daysUntil Returns number of days from now until $param1. Date $param1 Number
divide Returns the $numerator divided by the $denominator. Number $numerator, Number $denominator Number
equal Returns true if $param1 is equal to $param2. Generic $param1, Generic $param2 Boolean
floor Returns $param1 rounded down to the next integer. Number $param1 Number
getDropdownKeySet Returns a List of the keys in the dropdown named $param1. This list must be defined in the Dropdown editor. String $param1 List
getDropdownValue Returns the value for the $key found in the dropdown named $list. This list must be defined in the Dropdown editor. String $list, String $key Text
getDropdownValueSet Returns a List of the values in the dropdown named $param1. This list must be defined in the Dropdown editor. String $param1 List
greaterThan Returns true if $param1 is greater than $param2. Number $param1, Number $param2 Boolean
ifElse Returns $return1 if $condition is true or $return2 if $condition is false. Boolean $condition, Generic $return1, Generic $return2 Variable
indexOf Returns the position of $needle in $haystack or -1 if $haystack does not contain $needle. The index starts at 0. Generic $needle, List $haystack Number
isAfter Returns true if $param1 is after $param2. Date $param1, Date $param2 Boolean
isBefore Returns true if $param1 is before $param2. Date $param1, Date $param2 Boolean
isInList Returns true if $needle is contained within $haystack. Generic $needle, List $haystack Boolean
isValidDate Returns true if $param1 is a valid date string. String $param1 Boolean
isValidEmail Returns true if $param1 is in a valid email address format. String $param1 Boolean
isWithinRange Returns true if $value is greater than or equal to $min and less than or equal to $max. Number $value, Number $min, Number $max Boolean
ln Returns the natural log of $param1. Number $param1 Number
log Returns the $base Log of $value. Number $value, Number $base Number
max Returns highest value of the given parameters. Number $param1, … Number
median Returns the median of the given parameters. Number $param1, … Number
min Returns lowest value of the given parameters. Number $param1, … Number
monthofyear Returns the number of the month that $param1 is in. Date $param1 Number
multiply Returns the value of the given parameters multiplied together. Number $param1, … Number
negate Returns the negated value of $param1. Number $param1 Number
not Returns true if $param1 is false, and false if $param1 is true. Boolean $param1 Boolean
now Returns a Date object representing todays date and the current time. Date
number Returns the numeric value of $param1. String $param1 Number
or Returns true if any given parameters are true. Boolean $param1, … Boolean
pow Returns the $value raised to the power of $exponent. Number $value, Number $exponent Number
related Returns the value of $field in the related $module. Relate $module, String $field Variable
rollupAve Returns the average value of $field in records related to $module. Relate $module, String $field Number
rollupMax Returns the highest value of $field in records related to $module. Relate $module, String $field Number
rollupMin Returns the lowest value of $field in records related to $module. Relate $module, String $field Number
rollupSum Returns the sum of the values of $field in records related to $module. Relate $module, String $field Number
strlen Returns the number of characters in $param1. String $param1 Number
strToLower Returns $param1 converted to lower case. String $param1 Text
strToUpper Returns $param1 converted to upper case. String $param1 Text
subStr Returns the portion of $value specified by $start and $length. The position starts at 0. String $value, Number $start, Number $length Text
subtract Returns $param1 minus $param2. Number $param1, Number $param2 Number
today Returns a Date object representing todays date. Date
toString Returns $param1 converted to a string. Generic $param1 Text
translateLabel Returns the translated value of $label for $module. String $label, String $module Text
valueAt Returns the value at position $index in $haystack. Number $index, List $haystack Variable
Fields
Fields are listed on the bottom right hand corner of the formula builder and contain the fields for the current module. Fields can be referenced in formulas and will start with a $. To locate the field you need, you can scroll through the list or enter search criteria to narrow the list.
Logic_Fields_Search.png
To add a field to the formula, simply click on the field to be added. The variable name for the field will be placed at the end of the formula. You can also type the variable names manually in the formula.

Related fields are available to be added to formulas via the related function. You can manually add related function calls to your formula or you can build the syntax for the related function by clicking "Related Field".
Logic_Related_Field.png
This will open a dialog box which will assist in building the syntax to use the related function. Select a module and a field within that module to pull the related field from and click "Insert".
Logic_Related_Field_Insert.png
The resulting syntax for the selected options will be added to the formula.
Note : If a record has multiple related records to a module, the related function will pull the field from one of the related records. It is not recommended to rely on the related function to pull the same related records for a many relationship.
Rollup
In addition to adding related fields, you can also add aggregate functions on related fields to formulas via the rollup functions. You can manually add rollup function calls to your formula or you can build the syntax for the rollup function by clicking "Rollup".
Logic_Rollup.png
This will open a dialog box which will assist in building the syntax to use the rollup function. Select the type of rollup function to perform (Sum, Average, Minimum, or Maximum). To perform a count of related records, please refer to the count function listed in the Functions section. Select a module and a field within that module to perform the rollup function on and click "Insert".
Logic_Rollup_Insert.png
The resulting syntax for the selected options will be added to the formula.
Note : Rollup functions can only aggregate number type fields.

Viewing Layout History

Layouts, subpanels, and mobile layouts keep a history of the last ten changes made to the layout. To view the history for any of these layouts, simply select "View History" from the edit layout screen in Module Builder.
View_History.png
The history dialog box will open up showing the timestamps of the last ten saves to the selected layout. Select the timestamp or "Preview" for the layout revision to open it in a new tab the main panel.
View_History_Preview.png
From the Preview tab, you can see the details of the panels and fields on the layout. From the history dialog or from the Preview tab, click "Restore" to set the layout to the version selected.
View_History_Restore.png
The layout will load into the editor to allow you to make changes. Click "Save" to preserve your changes.

Restoring Layout Defaults

Many layouts, subpanels, and mobile layouts can be restored to their original default configuration. To restore the default for any of these layouts, simply select "Restore Default" from the edit layout screen in Module Builder.

Restore_Default.png
The default layout will load into the editor to allow you to make changes. Click "Save" to preserve your changes.

Deleting Modules

If a module is invalid or should no longer appear in a package, it may be deleted from Module Builder. Deleting a module from a package will not remove the module from any instances the package was deployed to. For more information on how to uninstall a deployed package from an instance, please refer to the Module Loader documentation in the Administration guide.
Use the following steps to delete a module from a package via Module Builder:

  1. Select the desired package and module from the Packages Panel, or the home page of Module Builder in the Main Panel.
    Delete_Modules_Select.png
  2. Click "Delete".
    Deleting_Modules_Delete.png
  3. A pop-up message will display asking for confirmation. Click "Ok" to proceed.