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:

  • Job

  • Ticket

  • Ticket Item

  • Ticket Log

  • Price Book

  • Quote

  • Quote Item

  • 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 True or False by these processes:

  • Manually

  • By an AltSync Trigger during day to day transactions

  • By the nightly AltSync processes.

If True, AltSync syncs. If False, 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.

Tip: The AltSync__c field works in conjunction with the Sync__c field. When both fields exist on the object, both fields must evaluate to True for the record to sync to mobile devices.

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 True.

This datetime stamp is used as an expiration date to determine whether the AltSync flag for the record needs to change to False.

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 True by a Trigger, the nightly AltSync process, or a manual change to the AltSync flag.

Contact

None unless the AltSync flag is set to True by a Trigger, the nightly AltSync process, or a manual change to the AltSync flag.

Crew Planning

FX5__Job__r.AltSync__c

Crew planning records sync when the job syncs

Equipment

None unless the AltSync flag is set to True by a Trigger, the nightly AltSync process, or a manual change to the AltSync flag.

Equipment Planning

FX5__Job__r.AltSync__c

Equipment planning records sync when the job syncs

Job

All on one line
FX5__Price_Book__r.AltSync__c && FX5__Sync__c

Jobs sync when it is syncable (flag controlled by a Status Workflow trigger) and the job’s price book syncs

Price Book

FX5__Is_Active__c

Price books sync when they are active

Price Book Item

FX5__Price_Book__r.AltSync__c

Price book items sync if its price book syncs

Quote

FX5__Status__r.FX5__Sync__c

Quotes sync when in a syncable status

Quote Item

FX5__Quote__r.AltSync__c

Quote items sync when the quote syncs

Ticket

All on one line
FX5__Job__r.AltSync__c && FX5__Sync__c

Tickets sync when the ticket is syncable and the job syncs

Ticket Checklist Steps

FX5__Ticket__r.AltSync__c

Ticket checklist steps sync when the ticket syncs

Ticket Item

FX5__Ticket__r.AltSync__c

Tickets items sync when the ticket syncs

Ticket Log

FX5__Ticket__r.AltSync__c

Ticket Logs sync when the ticket syncs

Well

None unless the AltSync flag is set to True by a Trigger, the nightly AltSync process, or a manual change to the AltSync flag.

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 True after the last detected activity.

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

  1. Contact Support to get an installation link for the AltSync package.

  2. Open your email app.

  3. Access FieldFX Back Office.

  4. Switch to Salesforce Classic

  5. Change the org-wide sharing defaults:

    1. From Setup.

    2. Enter sharing in the Quick Find box, then select Sharing Settings.

    3. Under Organization-Wide Defaults, click Edit.

    4. Locate Job in the list.

    5. In Default Internal Access, select Private.

    6. Locate the second Price Book object in the list.

    7. In Default Internal Access, select Private.

    8. Click Save and then click OK.

      You will receive an email confirmation once your sharing settings recalculate.

  6. 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.

  7. Install the AltSync unmanaged package:

    1. Click the installation link you received for the AltSync package.

      The installation page opens.

    2. Under What if existing component names conflict with ones in this package, select Do not install.

    3. Select Install for All Users.

    4. Click Install.

    5. Click Done.

      You will receive an email confirmation once the installation finished.

  8. Update permissions:

    1. 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

    2. Grant all users access to every LFW Apex class.

  9. 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:

  • Account

  • Contact

  • Crew Planning

  • Equipment

  • Equipment Planning

  • Job

  • Price Book

  • Price Book Item

  • Quote

  • Quote Item

  • Ticket

  • Ticket Item

  • Well

Add an AltSync Checkbox

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Open the Settings page for the object.

  4. Add the AltSync checkbox:

    1. Under Custom Fields & Relationships, click New.

    2. Select Formula.

    3. Click Next.

    4. In Field Label, enter AltSync

    5. Under Formula Return Type, select Checkbox.

    6. Click Next.

    7. In AltSync (Checkbox), enter a formula to use AltSync on an Equipment object.

      1. 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.

    8. Click Next.

    9. Click Visible twice.

    10. Click Next.

    11. Select the page layouts on which to include the checkbox.

    12. Click Save.

  5. Grant permissions for the AltSync checkbox.

Modify the Timespan Values for Sync Lookup Records

You can change the timespan values for Sync Lookup Records.

  1. From Setup, enter Metadata in the Quick Find box.

  2. Click Custom Metadata Types.

  3. Click Sync Lookup Setting.

  4. Click Manage Sync Lookup Settings.

  5. Click Edit next to the object with the Timespan Days value you want to change.

  6. 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.
  1. 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 or False with these processes:

      • Manually

      • By an AltSync Trigger during day to day transactions

      • By the nightly AltSync processes.

    If True, AltSync syncs. If False, 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.

  2. In the Sync Lookup Settings Custom Metadata Type, add a record for the lookup object:

    1. From Setup, enter Metadata in the Quick Find box, then click Custom Metadata Types

    2. Click Sync Lookup Setting.

    3. Click Manage Sync Lookup Settings.

    4. Click New.

    5. 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

  3. Click Save.