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
-
Add a Custom Field
-
Under Custom Fields & Relationships, click New
-
Select the type of field to add and click Next.
-
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.
-
Click Visible twice and then Next.
-
Select the page layouts on which to include the field and click Save.
-
Grant permissions for the field.
-
Run a script for the field:
-
Select Utilities → Apex Execute.
-
Enter the following script:
System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
-
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
orFalse
. -
The locking field must have the same name as the field to lock, with the prefix of
Locked_
Example 1. Locking theMax_Discount_Percent__c
FieldCreate 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
-
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. -
Select Fields & Relationships, then select New.
-
Select either Checkbox or Formula.
If you select Formula, the entered formula must evaluate to either True
orFalse
. -
Make the following entries:
-
Field Label: Enter a label for the locking field
-
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 theFX5__Maximum_Quantity__c
fieldEnter
Locked_Maximum_Quantity__c
. -
-
Click Next.
-
-
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. -
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. -
Select Save.