Custom Field Setup

Introduction

FieldFX features a number of standard fields that get installed with FieldFX packages.

You can add custom fields to extend standard functionality.

When you add a custom field, you can:

  • Add the field to layouts

  • Use the field in formulas

  • Use the field on reports

Prerequisites

To set up custom fields, you need the following permissions:

  • Minimum permissions for the FieldFX modules you are using

    • System permissions:

      • Customize Application

      • View Setup and Configuration

Best Practices

  • Don’t add custom fields that have the same or similar name to a managed field on a FieldFX object.

    Table 1. Similar field names
    Don’t add this field To this Object Because it’s too similar to this field

    Quote__c

    Job

    FX5__Quote2__c

    PBI__c

    Quote Item

    FX5__PBI_Default_Quantity__c

    List_Price__c

    Ticket Item

    FX5__Price__c

  • Don’t add SyncId fields to standard objects such as a SyncId field to the Account object.

  • If FieldFX Mobile users need to access many fields from an object, you may need to shorten the length of the API Name of the field to prevent URLs from becoming too long to process.

    Use the Description field to add a more meaningful name as needed.

  • Don’t set default values for custom checkboxes if you are using one of the following release channels:

    • Beta Bi-Weekly

    • Bi-Weekly

    • Quarterly Beta

    • Quarterly

Getting There

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Open the Settings page for the object.

Add a Custom Field

  1. Under Custom Fields & Relationships, click New

  2. Select the type of field to add and click Next.

  3. Enter field attributes and click Next.

    Never give a field the same name as a managed field on a FieldFX object.

    If FieldFX Mobile users access many fields from an object, long API Names may result in a browser error.

    If the object may have many custom fields needed by FieldFX Mobile users, minimize the length of the API Name for the fields.

  4. Click Visible twice and then Next.

  5. Select the page layouts on which to include the field and click Save.

  6. Grant permissions for the field.

  7. Run a script for the field:

    1. Access Workbench.

    2. Select UtilitiesApex Execute.

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. Click Execute

Custom Locked Fields

FieldFX supports using a boolean field that prevent edits to an associated field when the boolean field is selected. Activating a lock also prevents bulk editing the locked field.

This feature is already provided in FieldFX for

  • Description

  • Discount Percent

  • Price Markup

In addition to the default fields, you can also create custom locked fields on the following objects:

  • Price Book Item

  • Quote Item

  • Ticket Item

If you add the same field names to Price Book Item, Quote Item, and Ticket Item, the locking field value automatically copies from the price book to the Quote or Ticket.

This allows the locking field to be managed at the Price Book level.

Considerations

  • The locking field must be either a Checkbox field or a formula field that resolves to True or False.

  • The locking field must have the same name as the field to lock, with the prefix of Locked_

    Example 1. Locking the Max_Discount_Percent__c Field

    Create a Checkbox field called Locked_Max_Discount_Percent__c

  • The following field data types can be locked with a custom locking field:

    • Boolean/Checkbox

    • Currency

    • Date

    • DateTime

    • Email

    • Float/Number

    • Percent

    • MultiPicklist

    • Picklist

    • Phone

    • Reference / Master-Detail

    • String

    • Rich Text Area

    • TextArea

    • URL

Step-by-Step Guide

  1. In Setup, go to the Object Manager and select the object with the field to lock.

    The field to lock must be one of the data types listed above.
  2. Select Fields & Relationships, then select New.

  3. Select either Checkbox or Formula.

    If you select Formula, the entered formula must evaluate to either True or False.
  4. Make the following entries:

    1. Field Label: Enter a label for the locking field

    2. Field Name: Enter the Field Name in the following format:

      Locked_{Name-of-Target-Field}__c
      • Use the target field’s API name, without the FX5__ prefix or the __c suffix

      • You can lock a managed field

      • The Locking field’s name is case insensitive

      Example 2. To add a locking field for the FX5__Maximum_Quantity__c field

      Enter Locked_Maximum_Quantity__c.

    3. Click Next.

  5. Set the visibility of the field for user profiles per business needs, then click Next.

    A locking field doesn’t need to be visible for it to function but must be editable in the copied object.
  6. Add the field to any required page layouts for users that can manage whether the locking field is true or not.

    You aren’t required to add the locking field to page layouts for other users or where the field is set by a formula.
  7. Select Save.