AltSync Setup
Introduction
AltSync is a FieldFX feature enhancing the Salesforce sharing settings so control of the syncable data can be controlled on a record by record basis. You can also create a checkbox at the Salesforce Object level. If you select the checkbox (true), the record syncs to Mobile. The user must have read rights to the object. If you leave the checkbox unselected (false), the record isn’t synced to FieldFX Mobile. The user’s read rights to the object doesn’t affect the record’s sync status.
For more information, see Sync engine.
You can quickly install an AltSync solution from an unmanaged package or manually install for greater customization.
The quickest way to set up the AltSync feature is to install the AltSync unmanaged package.
The AltSync package gives you instant control over the key transactional data that syncs to FieldFX Mobile.
Transactional data includes records on any of the following objects and any master-detail children of FX Forms:
|
Depending on the version of Sync, you can customize AltSync for objects.
Prerequisites
To set up the and use AltSync feature, you need to:
Have these user licenses | Have these permissions | Complete these tasks and be familiar with these topics before continuing |
---|---|---|
|
The AltSync unmanaged package available with version 1.309 or greater replaces the former FX5AltSync package, which is deprecated. |
How AltSync Works
The AltSync package adds an AltSync flag checkbox, AltSyncStamp datetime field, and AltSyncSource text field to four objects:
-
Account (
Account
) -
Contact (
Contact
) -
Equipment (
FX5__Equipment__c
) -
Well (
FX5__Well__c
)
Best Practice
Don’t use same or similar names for FieldFX standard objects, fields, and API Names. Using the same or similar names could cause performance issues in Salesforce platform and FieldFX.
AltSync utilizes three custom fields on various objects:
Field | Field Type | Description | ||
---|---|---|---|---|
AltSync |
checkbox |
Indicates whether the record should be synced to mobile. The flag can be set to
If Child transactional data objects should use lookups to their parent object to define the flag. For example, Ticket Items should look to the parent Ticket.
|
||
AltSyncSource |
field |
A text field with a value of either None or Linked. Value set by Trigger or process when the record is referenced by another record. For example, the value is set to Linked on an Account when a Ticket for the Account has activity. |
||
AltSyncStamp |
field |
Time stamp when the AltSync flag is set to This datetime stamp is used as an expiration date to determine whether the AltSync flag for the record needs to change to |
The AltSync package also adds an AltSync__c
field to each of the following objects, and includes a formula for most of them:
Object | Formula | Impact |
---|---|---|
Account |
None unless the AltSync flag is set to |
|
Contact |
None unless the AltSync flag is set to |
|
Crew Planning |
|
Crew planning records sync when the job syncs |
Equipment |
None unless the AltSync flag is set to |
|
Equipment Planning |
|
Equipment planning records sync when the job syncs |
Job |
All on one line |
Jobs sync when it is syncable (flag controlled by a Status Workflow trigger) and the job’s price book syncs |
Price Book |
|
Price books sync when they are active |
Price Book Item |
|
Price book items sync if its price book syncs |
Quote |
|
Quotes sync when in a syncable status |
Quote Item |
|
Quote items sync when the quote syncs |
Ticket |
All on one line |
Tickets sync when the ticket is syncable and the job syncs |
Ticket Checklist Steps |
|
Ticket checklist steps sync when the ticket syncs |
Ticket Item |
|
Tickets items sync when the ticket syncs |
Ticket Log |
|
Ticket Logs sync when the ticket syncs |
Well |
None unless the AltSync flag is set to |
How AltSync Activity Based Sync works
In a nutshell, AltSync is intended to reduce the number of records syncing to Mobile, reducing the sync time and remove redundant records. By accomplishing both of these, searches will be faster and there will be less mistakes.
AltSync evaluates if a sync-able look-up record (on a transactional object) has been used for a determined period of time. If the record has been used, it will continue to be synced. If the record hasn’t been used, a nightly automation unchecks the AltSync flag. The record won’t sync to Mobile anymore.
Sync Lookup Settings manages AltSync flags on lookup records by the activity on transactional data.
Transactional data includes records on any of the following objects: Job, Ticket, Ticket Item, Ticket Log, Price Book, Quote, Quote Item, FX Forms, and any master-detail children of FX Forms. |
Sync Lookup Setting records in Custom Metadata Type specify how many days to detect activity for a lookup record.
The settings also determine how many days the lookup record’s AltSync flag should remain True
after the last detected activity for the record.
The default Timespan value specifies 30 days to detect activity and keep the lookup record AltSync as The process to review and adjust AltSync flags on lookup records runs nightly. |
Sync Lookup Settings exist for
-
Account
-
Contact
-
Equipment
-
Well
Step-by-Step Guides
You can accomplish the following to set up AltSync:
Install the AltSync Package
-
Contact Support to get an installation link for the AltSync package.
-
Open your email app.
-
Change the org-wide sharing defaults:
-
From Setup.
-
Enter
sharing
in the Quick Find box, then select Sharing Settings. -
Under Organization-Wide Defaults, click Edit.
-
Locate Job in the list.
-
In Default Internal Access, select Private.
-
Locate the second Price Book object in the list.
-
In Default Internal Access, select Private.
-
Click Save and then click OK.
You will receive an email confirmation once your sharing settings recalculate.
-
-
Review the following objects for an existing AltSync field and delete the field if it exists:
-
Account
-
Contact
-
Crew Planning
-
Equipment
-
Equipment Planning
-
Job
-
Price Book
-
Price Book Item
-
Quote
-
Quote Item
-
Ticket
-
Ticket Item
-
Well
Caution: If you do not delete an existing AltSync field on one or more of these objects, the FX5AltSync package cannot install.
-
-
Install the AltSync unmanaged package:
-
Click the installation link you received for the AltSync package.
The installation page opens.
-
Under What if existing component names conflict with ones in this package, select Do not install.
-
Select Install for All Users.
-
Click Install.
-
Click Done.
You will receive an email confirmation once the installation finished.
-
-
Update permissions:
-
Grant all users Read access to the AltSync checkbox on the following objects:
-
Account
-
Contact
-
Crew Planning
-
Equipment
-
Equipment Planning
-
Job
-
Price Book
-
Price Book Item
-
Quote
-
Quote Item
-
Ticket
-
Ticket Item
-
Well
-
-
Grant all users access to every LFW Apex class.
-
-
Update page layouts and add the AltSync checkbox to page layouts for the following objects:
-
Account
-
Contact
-
Crew Planning
-
Equipment
-
Equipment Planning
-
Job
-
Price Book
-
Price Book Item
-
Quote
-
Quote Item
-
Ticket
-
Ticket Item
-
Well
-
Use Custom AltSync Checkboxes
You can add AltSync checkboxes to any object if you are using Sync 4.0 or add them to the these objects if you aren’t using Sync 4.0:
|
|
|
Add an AltSync Checkbox
-
Open the Settings page for the object.
-
Add the AltSync checkbox:
-
Under Custom Fields & Relationships, click New.
-
Select Formula.
-
Click Next.
-
In Field Label, enter
AltSync
-
Under Formula Return Type, select Checkbox.
-
Click Next.
-
In AltSync (Checkbox), enter a formula to use AltSync on an Equipment object.
-
Use the
FX5__Out_of_Service__c = false
formula for an AltSync checkbox on the Equipment object.This formula configures the Sync Engine so that equipment records don’t sync when they have Out of Service selected.
-
-
Click Next.
-
Click Visible twice.
-
Click Next.
-
Select the page layouts on which to include the checkbox.
-
Click Save.
-
-
Grant permissions for the AltSync checkbox.
Modify the Timespan Values for Sync Lookup Records
You can change the timespan values for Sync Lookup Records.
-
From Setup, enter
Metadata
in the Quick Find box. -
Click Custom Metadata Types.
-
Click Sync Lookup Setting.
-
Click Manage Sync Lookup Settings.
-
Click Edit next to the object with the Timespan Days value you want to change.
-
Enter the desired Timespan Days value, then click Save.
Add Additional Lookup Data Objects to Sync Lookup Settings
You can use additional objects for the Sync Lookup Manager. Using the additional objects can help manage the AltSync flag based on transactional lookup activity. The object should exist as a lookup from a transaction data object.
Transactional data includes records on any of the following objects: Job, Ticket, Ticket Item, Ticket Log, Price Book, Quote, Quote Item, FX Forms, and any master-detail children of FX Forms. |
-
On the lookup object, confirm that the following fields exist or create them:
AltSync__c:
Indicates whether the record should be synced to mobile.
-
The flag can be set to
True
orFalse
with these processes:-
Manually
-
By an AltSync Trigger during day to day transactions
-
By the nightly AltSync processes.
-
If
True
, AltSync syncs. IfFalse
, AltSync doesn’t sync.Child transactional data objects should use lookups to their parent object to define the flag.
For example, Ticket Items should look to the parent Ticket.
AltSyncSource__c:
A Text field with a value of either None or Linked
Value set by Trigger or process when the record is referenced by another record.
For example, the value is set to Linked on an Account when a Ticket for the Account has activity.
AltSyncStamp__c:
Datetime field set when the AltSync flag is set to `True
This datetime stamp is used as an expiration date to determine whether the AltSync flag for the record needs to change to False.
-
-
In the Sync Lookup Settings Custom Metadata Type, add a record for the lookup object:
-
From Setup, enter
Metadata
in the Quick Find box, then click Custom Metadata Types -
Click Sync Lookup Setting.
-
Click Manage Sync Lookup Settings.
-
Click New.
-
Make the following entries:
Label:
Name or description of the lookup object
Sync Lookup Setting Name:
Accept the default value Salesforce generates
Lookup Type
API name of the lookup object
Timespan Days:
Number of days that lookups should be detected and that should pass after the last detected activity before the record’s AltSync flag is set to
False
-
-
Click Save.
Recommended Reading
-
AltSync - Learn how the AltSync feature works.
-
Sync Configuration Setup - How to setup Sync.
-
Sync Wizard - Use an easy to follow wizard