Mobile Validations
Prerequisites
-
To set up validation rules, you need:
-
Minimum permissions for the FieldFX modules you are using
-
System permissions:
-
API Enabled
-
Author Apex
-
Customize Application
-
View Setup and Configuration
-
-
How it Works
-
Validation rules run when you save a record:
-
If the record passes validation, the record saves.
-
If the record doesn’t pass validation, a warning displays and you can’t save the record until you enter valid data or discard your changes.
-
-
Validation rules also run when you change the status of a record:
-
If the record passes validation, the record transitions to the new status.
-
If the record doesn’t pass validation, a warning displays and you can’t change the status until you enter valid data or discard your changes.
-
-
While validation rules can work in either FieldFX Back Office or FieldFX Mobile, this tool is specifically for creating validation rules for FieldFX Mobile.
To create validation rules for FieldFX Back Office, see Validation Rule Setup.
-
Validation rules can be added for the following objects:
-
Job
-
Quote
-
Quote_Item
-
Ticket
-
Ticket_Item
-
Ticket_Log
-
WorkOrder
-
WorkTask
-
WorkTaskStep
-
eForms with an eForm configuration
-
-
Each object can have an unlimited number of rules.
Creating Mobile Validation Rules
Static Resource File
-
Mobile Validations work by looking for a Static Resource file called
FX_Mobile_Rules
. -
If this file already exists, skip to selecting an object.
-
If the file does not exist, start by importing objects and rules from Back Office.
Import Existing Back Office Rules
-
Go to https://admin.fieldfx.com and log in to the Sandbox or Production org to use for the validations
-
Under Option 2, click Import
-
Select FieldFX Back Office rules and objects to import to the Mobile Rules file, then click Next
Select as many objects as needed.
Use the search bar to find the object to Import by an existing rule.
Rules that already exist for mobile display in a grayed-out list and cannot be selected for import.
-
Select the FieldFX Back Office rule(s) to import to the FX Mobile Rules file, then click Import
The Mobile Validations tool completes the Import and returns to the landing page.
Create a New Rule
-
Go to https://admin.fieldfx.com and log in to the Sandbox or Production org to use for the validations
-
Click Mobile Validations
-
In Object, select the sObject for the rule, then click New
If the
FX_Mobile_Rules
Static Resource file does not exist, complete the Import steps described above, then proceed. -
Make the following entries:
-
Rule Name (required): unique name for the rule on this object
-
Status: Select the Active checkbox when the rule is ready to apply
Deselect the checkbox to temporarily disable the rule.
-
Error Message (required): message to display to the user if the validation is not met
-
Error Location: select Top_of_Page to show the message in a banner at the top of the user’s screen
or
select Field to show the message below a specific field on the user’s screen, then select the field the user needs to correct
-
Error Condition Formula (required): SOQL formula that must evaluate to
TRUE
for the rule to be met and the record to save -
Validation Description: description of the rule
-
-
Click Save
This rule forces users to select the customer’s price book when adding a job.
Modify an Existing Rule
-
Go to https://admin.fieldfx.com and log in to the Sandbox or Production org to use for the validations
-
Click Mobile Validations
-
In Option 1, select the sObject for the rule to modify
-
Select the rule to modify
-
Make any of the the following entries:
-
Rule Name (required): unique name for the rule on this object
-
Status: Select the Active checkbox when the rule is ready to apply
Deselect the checkbox to temporarily disable the rule.
-
Error Message (required): message to display to the user if the validation is not met
-
Error Location: select Top_of_Page to show the message in a banner at the top of the user’s screen
or
select Field to show the message below a specific field on the user’s screen, then select the field the user needs to correct
-
Error Condition Formula (required): SOQL formula that must evaluate to
TRUE
for the rule to be met and the record to save -
Validation Description: description of the rule
-
-
Click Save
Delete a Rule
-
Go to https://admin.fieldfx.com and log in to the Sandbox or Production org to use for the validations
-
Click Mobile Validations
-
In Option 1, select the sObject for the rule to modify
-
Select the rule to modify
-
Click Delete
There is no confirmation, and the rule cannot be recovered once deleted.
Recommended Reading
-
Read more about Validation Rules