FX Form Setup

Prerequisites

To setup and use FX Forms, you need to:

Have these user licenses Have these permissions Complete these tasks
and review these topics
before continuing

Guidelines

When setting up FX Forms, keep in mind these details about the Master-Detail, SyncID, and Job Share Trigger fields:

Master-Detail Field

  • The Master-Detail field controls the parent object for an FX Form. This field also determines the type of record for which you can add the FX Form.

    If an FX Form has a master-detail relationship with the Ticket object, you can add the FX Form to tickets.
  • Every FX Form requires a Master-Detail field.

SyncId Field

  • The SyncId field controls whether an FX Form syncs to FieldFX Mobile.

    FX Forms only sync if they have a unique value set in the SyncId field.

  • To prevent sync issues, you must:

    • Add a SyncId field to every FX Form.

    • Add a workflow rule to assign unique sync ids to FX Forms automatically.

Job Share Trigger Field

Use the Job Share Trigger to download only the child records you want in FieldFX Mobile that are associated with a parent object.

Example 1. Job Share Trigger

If there are 5 JSA (Job Safety Analysis) records associated with one Job record in mobile, only the 5 JSA records that is associated with the Job will be downloaded to mobile, not all records in the JSA object.

You should have for the Job Share (Job_Share__c) field at least Read permission in the form object in a profile or in a permission set that is associated with a Fieldfx mobile user.

Enable Job Share Trigger Field

  1. Ensure that you have the Job Share Trigger added to each of your eForm Config records.

  2. Ensure that you have read permission and have the Doc Share field populated.

  3. Under Setup > Object Manager > Form_Name > Field & Relationships, ensure there is a Job_Share__c field.

    Form_Name is the name of your form.

    The Job_Share__c field must be a lookup data type field to the job.

  4. Under Setup > Object Manager > Form Name > Triggers, ensure there is a trigger called <form name>Trigger_FX5Auto.

    Form_Name and <form name> is the name of your form.

    If there is a Job_Share__c field, the trigger is automatically created.

Add an FX Form

Before you can add an FX Form, the Job Share Trigger field must be added by following Enable Job Share Trigger Field. It is needed for the form to only download the related records that pertain to that object.

Customers should review the terms and conditions of the Software Subscription and Support Agreement (including the SFDC Supplemental Terms) to understand the rights and restrictions that Customers have regarding creating custom objects.

Add a custom object

Start by adding a custom object for the FX Form.

  1. From Setup, enter schema in the Quick Find box, then select Schema Builder.

  2. Click the Elements tab.

  3. Drag Object from the Elements panel onto the grid.

    Screenshot of dragging an object to the Elements panel
  4. Complete the following:

    Field Action Example

    Label

    Enter a name for the FX Form

    JSA

    Plural Label

    Enter a plural name for the FX Form

    JSAs

    Starts With

    Select "Consonant" or "Vowel"

    Data Type

    Select "Text"

  5. Select Allow Reports.

  6. Click Save.

  7. Select Add Google Docs, Notes, Attachments, related list to default page layout.

  8. Continue with Add the Master-Detail and SyncId fields.

Add the Master-Detail and SyncId fields

  1. Add the Master-Detail field:

    A Master-Detail field is required on every FX Form.

  2. Drag Master-Detail from the Elements panel onto the FX Form object.

  3. In Field Label:

  4. In Related To:

  5. Click Save

  6. Add the SyncId field:

    You must add a SyncId field to every FX Form.

  7. Drag Text from the Elements panel onto the FX Form object.

  8. In Field Label and Field Name, enter SyncId.

    The Field Label and Field Name fields are case-sensitive, so you must enter SyncId correctly.

  9. In Length, enter 50.

  10. Select Unique.

  11. Under Is Case Sensitive, select Treat "ABC" and "abc" as duplicate values (case-insensitive).

  12. Select External ID.

  13. Click Save.

  14. Continue on with Add fields to collect data.

Add fields to collect data

  1. Drag a field type from the Elements panel onto the FX Form object.

  2. Enter field attributes.

    Don’t give a custom field the same name as a field on a FieldFX object.

  3. Click Save.

  4. To add more fields, repeat these steps.

  5. Continue on with defining the layout.

Define the page layout

  1. Click the gear icon on the FX Form object and select View Page Layouts.

    Screenshot of selecting the View Page Layouts option
  2. Under Page Layouts, click Edit next to the default page layout.

  3. Drag fields onto the page layout to create the FX Form.

  4. On the toolbar, click Related Lists.

  5. Drag Notes & Attachments into the Related Lists section.

  6. Click Save.

  7. Continue with Add the Job Share trigger.

Add the Job Share trigger

  1. In Setup, select Object Manager.

  2. Select the form and choose Triggers.

  3. Ensure there is a trigger called <form name>Trigger_FX5Auto.

    Form_Name and <form name> is the name of your form.

    If there is a Job_Share__c field, the trigger is automatically created.
  4. Continue with [Adding Record Types for an FX Form].

Add Record Types for an FX Form

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. From Setup, enter object in the Quick Find box, then select Objects.

  4. Open the FX Form object.

  5. Under Record Types, click New.

  6. In Existing Record Type, select "--Master--".

  7. In Record Type Label, enter the record type.

  8. Select Active.

  9. Click Next.

  10. Click Save & New.

  11. Repeat these steps for other record types as needed.

  12. Click Save to finish.

  13. Click Back to Custom Object at the top of the page.

  14. Continue with Add Page Layouts for Record Types.

Add Page Layouts for Record Types

Once you have added the record types, you can add page layouts for each record type.

Page layouts control the fields that display on each version of an FX Form.

  1. Under Page Layouts, click New.

  2. In Page Layout Name, enter the record type.

  3. Click Save.

  4. Drag fields onto the page layout.

  5. Click Save.

  6. Repeat for other page layouts as needed.

  7. Continue with Assign the page layouts to record types.

Assign the page layouts to record types

  1. Under Record Types, click Page Layout Assignment.

  2. Click Edit Assignment.

  3. Click the column header for the record type.

  4. In Page Layout To Use, select the record type’s page layout.

  5. Repeat these steps for other record types as needed.

  6. Click Save.

  7. Continue with Add an FX Form configuration.

Add an FX Form configuration

This step must be done in Salesforce Classic.
  1. Open the eForm Configs tab.

  2. Click New.

  3. In Key SObject:

  4. In eForm SObject, enter the API name of the FX Form object.

    For example, you can enter JSA__c for the API name.

    The sObject name, which is case-sensitive, must be the object’s API name.

  5. Specify when to use the FX Form:

    If you don’t select one of the following options, users can add the FX Form to any job or ticket.

    Field Action

    Key SObject Record Type

    Select a record type to use the FX Form for that record type.

    Account

    Select a customer to use the FX Form for that customer.

    Office

    Select an office to use the FX Form for that office.

    Segment

    Select an office to use the FX Form for that office.

    Price Book

    Select a price book to use the FX Form for jobs/tickets linked to that price book.

    Sequence numbers control the order of FX Forms in lists. Refer to the Sequence Numbers article for more information.

  6. Click Save.

  7. Continue with Add a Related List to page layouts.

  1. From Setup, enter object in the Quick Find box, then select Objects

  2. If the FX Form is for:

  3. Under Page Layouts, click Edit next to a page layout for FieldFX Back Office.

  4. On the toolbar, click Related Lists.

  5. Drag the FX Form into the Related Lists section.

  6. Click Save.

  7. Click Yes.

  8. If needed in other page layouts, edit another page layout and drag the FX Form into the Related Lists section.

  9. Complete one of the following:

  10. Move back to FieldFX Back Office.

  11. Open the Report Templates tab.

  12. Click New.

  13. In Report Template Name, enter a name for the report template.

  14. In SObject, enter the API name of the FX Form object,

  15. Click Save.

  16. Click Attach File.

  17. Click Choose File.

  18. Select the report you defined for the FX Form.

  19. Click Attach File.

  20. Click Done.

  21. Continue with Add a Visualforce page for the report version.

Add a Visualforce page for the report version

See the FX Form topic.

  1. From Setup, enter pages in the Quick Find box, then select Visualforce Pages.

  2. Click New.

  3. In Label, enter the name of the FX Form.

  4. In Name, enter the name of the FX Form with underscores for spaces.

  5. Copy the following code:

    <apex:page standardController="ObjectName" extensions="FX5.ReportTemplateExtension">
      <apex:includeScript value="{!$Resource.FX5__jquery1102minjs}"/>
      <style type="text/css">
        div.apexp {
          margin-left:-10px;
        }
        body {
          margin-left:0px !important;
        }
        a {
          text-decoration:none;
        }
      </style>
      <script type="text/javascript">
        $('td.labelCol.empty').remove();
        $('td.dataCol.empty').css('width','50%');
        $('td.labelCol.first').css('vertical-align', 'bottom');
        $('td.dataCol.first').css('vertical-align', 'bottom');
        $('input[type=submit]').appendTo('td.dataCol.empty');
        function jsOpenReport(entityId, templateId, objectTypeId, namespace)
        {
          var pagePath ='apex';
          var ctrl = document.querySelectorAll("[id$='reportPagePath']")[0];
          var customUrl='';
          if(ctrl!=null)
          {
            pagePath = ctrl.innerText;
            if(pagePath && pagePath.toLowerCase()!='apex')
            {
              customUrl='&customUrl=' + pagePath;
            }
          }
          var href = '/' + pagePath + '/' + namespace + 'Reporting?templateId='+ templateId + '&objectId=' + entityId + '&objectType=' + objectTypeId + customUrl;
          window.open(href, '_blank');
          window.top.location=window.top.location;
        }
      </script>
      <div style="display:none;">
        <apex:outputText id="reportPagePath" value="{!PagePath}" />
      </div>
      <apex:dynamicComponent componentValue="{!form}" id="dynamic"/>
    </apex:page>
  6. Replace the code on the Visualforce Markup tab by pasting over it with the code you copied.

  7. In the first line of the code, replace ObjectName with the API name of the FX Form object.

    <apex:page standardController="JSA__c" extensions="FX5.ReportTemplateExtension">
  8. Click the Version Settings tab.

  9. Click -- Select to Add Installed Package -- and select FieldFX Base Package.

  10. Click Save.

  11. Continue with Update page layouts.

Update page layouts

  1. From Setup, enter "object" in the Quick Find box, then select Objects.

  2. Open the FX Form object.

  3. Under Page Layouts, click Edit next to a page layout for FieldFX Back Office.

  4. On the toolbar, click Visualforce Pages.

  5. Drag Section from the toolbar to a suitable location on the layout.

  6. In Section Name, enter "Reports".

  7. Under Layout, select 1-Column.

  8. Click OK.

  9. Drag the Visualforce page for the FX Form report into the Reports section.

  10. Click Save on the toolbar.

  11. Repeat these steps if you need other page layouts.

  12. Continue with Add a workflow rule.

Add a workflow rule

Add a workflow rule so that FX Forms sync to FieldFX Mobile.

  1. From Setup, enter workflow rules in the Quick Find box, then select Workflow Rules.

  2. Click New Rule.

  3. In Object, select the FX Form object.

  4. Click Next.

  5. Complete the following:

    1. In Rule Name, enter "Sync Id Assignment".

    2. In Evaluate the rule when a record is, select created.

    3. In Run this rule if the following, select formula evaluates to true.

    4. Enter the following formula:

      ISBLANK (SyncId__c)
  6. Click Save & Next.

  7. Click Add Workflow ActionNew Field Update.

  8. Complete the following:

    1. In Name, enter Sync Id.

    2. In Field to Update, select "SyncId".

    3. In Text Options, select Use a formula to set the new value.

    4. Enter the following formula:

      CASESAFEID(Id)
  9. Click Save.

  10. Click Done.

  11. Click Activate.

  12. Continue with Grant permissions.

Grant permissions

Grant permission to use the FX Form.

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set

  3. Under Apps, click Object Settings.

  4. Open the FX Form object.

  5. Click Edit.

  6. Under Record Type Assignments, select the record types for which to grant access

  7. Under Object Permissions, select Read, Create, and Edit

    If you didn’t select Unique when adding the SyncId field to the FX Form, grant View All permission for the FX Form object.

  8. Under Field Permissions, grant Read and Edit permission for every field.

  9. Click Save.

  10. At the top of the page, click the arrow next to Object Settings and select Visualforce Page Access.

  11. Click Edit.

  12. Add the Visualforce page for the FX Form to Enabled Visualforce Pages.

  13. Click Save.

  14. Repeat steps a to m for other permission sets as needed.

  15. Continue with Configure Share Settings.

Configure Share Settings

Finished adding an FX Form

You’ve finished adding an FX Form.

Add a Child FX Forms

You can set up child FX Forms to record information related to another FX Form.

Before you can add a child FX Form, the Job Share Trigger field must be added by following Enable Job Share Trigger Field. It is needed for the form to only download the related records that pertain to that object.

Example 2. Wireline logging tickets

If an FX Form records details for wireline logging tickets, add a child FX Form to record the measurements made during each logging run.

Child FX Forms have a master-detail relationship with a parent FX Form.

Customers should review the terms and conditions of the Software Subscription and Support Agreement (including the SFDC Supplemental Terms) to understand the rights and restrictions that Customers have regarding creating custom objects.

Add a custom object for the child FX Form

Start by adding a custom object to the child FX Form.

  1. From Setup, enter schema in the Quick Find box, then select Schema Builder.

  2. Click the Elements tab.

  3. Drag Object from the Elements panel onto the grid.

    Screenshot of dragging an object onto the grid from the Elements panel
  4. Complete the following:

    Field Action Example

    Label

    Enter a name for the child FX Form

    Logging Run

    Plural Label

    Enter a plural name for the child FX Form

    Logging Runs

    Starts With

    Select "Consonant" or "Vowel".

    Data Type

    Select "Text"

    Allow Reports

    Select this.

    Add Google Docs, Notes, Attachments, related list to default page layout

    Select this.

  5. Click Save.

  6. Continue with Add the Master-Detail and SyncId fields.

Add the Master-Detail and SyncId fields

  1. Add the Master-Detail field:

    You must add a Master-Detail field to every child FX Form.

    1. Drag Master-Detail from the Elements panel onto the child FX Form object.

    2. In Field Label:

    3. In Related To:

    4. Click Save.

  2. Add the SyncId field:

    You must add a SyncId field to every child FX Form.

    1. Drag Text from the Elements panel onto the child FX Form object.

    2. In Field Label and Field Name, enter SyncId.

      The Field Label and Field Name fields are case sensitive so you must enter SyncId correctly.

    3. In Length, enter "50".

    4. Select Unique.

    5. Under Is Case Sensitive, select Treat "ABC" and "abc" as duplicate values (case insensitive).

    6. Select External ID.

    7. Click Save.

  3. Continue with Add fields to collect data.

Add fields to collect data

  1. Drag a field type from the Elements panel onto the child FX Form object.

  2. Enter field attributes.

  3. Click Save.

  4. To add more fields, repeat these steps.

  5. Continue with Define the layout.

Define the layout

  1. Click the gear icon on the child FX Form object and select View Page Layouts.

  2. Under Page Layouts, click Edit next to the default page layout.

  3. Drag fields onto the page layout to create the child FX Form.

  4. On the toolbar, click Related Lists.

  5. Drag Notes & Attachments into the Related Lists section.

  6. Click Save.

  7. Add a Related List to page layouts:

    1. From Setup, enter object in the Quick Find box, then select Objects.

  8. If the FX Form is for:

  9. Under Page Layouts, click Edit next to a page layout for FieldFX Back Office.

  10. On the toolbar, click Related Lists.

  11. Drag the FX Form into the Related Lists section.

  12. Click Save.

  13. Click Yes.

  14. Repeat these steps if other page layouts are needed.

  15. Complete one of the following:

  16. Continue with Add a report template.

Add a report template

Now you can add a a report template for the report version of the child FX Form.

  1. Move back to FieldFX Back Office.

  2. Open the Report Templates tab.

  3. Click New.

  4. In Report Template Name, enter a name for the report template.

  5. In SObject, enter the API name of the child FX Form object.

  6. Click Save.

  7. Click Attach File.

  8. Click Choose File.

  9. Select the report you defined for the child FX Form.

  10. Click Attach File.

  11. Click Done.

  12. Continue with Add a Visualforce page for the report version.

Add a Visualforce page for the report version

Add a Visualforce page for the report version of the child FX Form.

  1. From Setup, enter pages in the Quick Find box, then select Visualforce Pages.

  2. Click New.

  3. In Label, enter the name of the child FX Form.

  4. In Name, enter the name of the child FX Form with underscores for spaces.

  5. Copy the following code:

    <apex:page standardController="ObjectName" extensions="FX5.ReportTemplateExtension">
      <apex:includeScript value="{!$Resource.FX5__jquery1102minjs}"/>
      <style type="text/css">
        div.apexp {
          margin-left:-10px;
        }
        body {
          margin-left:0px !important;
        }
        a {
          text-decoration:none;
        }
      </style>
      <script type="text/javascript">
        $('td.labelCol.empty').remove();
        $('td.dataCol.empty').css('width','50%');
        $('td.labelCol.first').css('vertical-align', 'bottom');
        $('td.dataCol.first').css('vertical-align', 'bottom');
        $('input[type=submit]').appendTo('td.dataCol.empty');
        function jsOpenReport(entityId, templateId, objectTypeId, namespace)
        {
          var pagePath ='apex';
          var ctrl = document.querySelectorAll("[id$='reportPagePath']")[0];
          var customUrl='';
          if(ctrl!=null)
          {
            pagePath = ctrl.innerText;
            if(pagePath && pagePath.toLowerCase()!='apex')
            {
              customUrl='&customUrl=' + pagePath;
            }
          }
          var href = '/' + pagePath + '/' + namespace + 'Reporting?templateId='+ templateId + '&objectId=' + entityId + '&objectType=' + objectTypeId + customUrl;
          window.open(href, '_blank');
          window.top.location=window.top.location;
        }
      </script>
      <div style="display:none;">
        <apex:outputText id="reportPagePath" value="{!PagePath}" />
      </div>
      <apex:dynamicComponent componentValue="{!form}" id="dynamic"/>
    </apex:page>
  6. Replace the code on the Visualforce Markup tab by pasting over it with the code you copied.

  7. In the first line of the code, replace "ObjectName" with the API name of the child FX Form object.

    <apex:page standardController="Logging_Run__c" extensions="FX5.ReportTemplateExtension">
  8. Click the Version Settings tab.

  9. Click -- Select to Add Installed Package -- and select "FieldFX Base Package".

  10. Click Save.

  11. Continue with Update Page Layouts.

Update Page Layouts

  1. From Setup, enter object in the Quick Find box, then select Objects.

  2. Open the FX Form object.

  3. Under Page Layouts, click Edit next to a page layout for FieldFX Back Office.

  4. On the toolbar, click Visualforce Pages.

  5. Drag Section from the toolbar to a suitable location on the layout.

  6. In Section Name, enter "Reports".

  7. Under Layout, select 1-Column.

  8. Click OK.

  9. Drag the Visualforce page for the FX Form report into the Reports section.

  10. Click Save on the toolbar.

  11. Repeat steps c to j for other page layouts as needed.

  12. Continue with Add a workflow rule.

Add a workflow rule

Add a workflow rule so that FX Forms sync to FieldFX Mobile.

  1. From Setup, enter workflow rules in the Quick Find box, then select Workflow Rules.

  2. Click New Rule.

  3. In Object, select the child FX Form object

  4. Click Next.

  5. Complete the following:

    1. In Rule Name, enter Sync Id Assignment.

    2. In Evaluate the rule when a record is, select created.

    3. In Run this rule if the following, select "formula evaluates to true".

    4. Enter the following formula:

      ISBLANK (SyncId__c)
  6. Click Save & Next.

  7. Click Add Workflow ActionNew Field Update.

  8. Complete the following:

    1. In Name, enter Sync Id.

    2. In Field to Update, select SyncId.

    3. In Text Options, select Use a formula to set the new value.

    4. Enter the following formula:

      CASESAFEID(Id)
  9. Click Save.

  10. Click Done.

  11. Click Activate.

  12. Continue with Grant permissions.

Grant permissions

These permissions are required to use the child FX Form.

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set.

  3. Under Apps, click Object Settings.

  4. Open the child FX Form object.

  5. Click Edit.

  6. Under Record Type Assignments, select the record types for which to grant access.

  7. Under Object Permissions, select Read, Create, and Edit.

  8. Under Field Permissions, grant Read and Edit permission for every field.

  9. Click Save.

  10. At the top of the page, click the arrow next to Object Settings and select Visualforce Page Access.

  11. Click Edit.

  12. Add the Visualforce page for the FX Form to Enabled Visualforce Pages.

  13. Click Save.

  14. Repeat steps a to m for other permission sets as needed.

  15. Continue with Configure Sharing Settings and Inline Help.

Configure Sharing Settings and Inline Help

Finished adding a Child FX Form

You’ve completed adding a Child FX Form.

FX Form Configurations

An FX Form configuration controls when an FX Form is available for use.

You must add an FX Form configuration for every basic FX Form.

Child RX Forms use the FX Form configuration for their parent FX Form.

Add an FX Form Configuration

  1. Access FieldFX Back Office.

  2. Open the eForm Configs tab.

  3. Click New.

  4. In Key SObject, select:

    • If the FX Form is for jobs, use FX5__Job__c.

    • If the FX Form is for tickets, use FX5__Ticket__c.

  5. In eForm SObject, for example, enter JSA__c for the API name of the FX Form object.

  6. Specify when to use the FX Form:

    If you don’t select one of the following options, users can add the FX Form to any job / ticket.

    Field Action

    Key SObject Record Type

    Select a record type to use the FX Form for that record type.

    Account

    Select a customer to use the FX Form for that customer.

    Office

    Select an office to use the FX Form for that office.

    Segment

    Select a business segment to use the FX Form for that segment.

    Price Book

    Select a price book to use the FX Form for jobs / tickets linked to that price book.

    Sequence Number

    Enter a sequence number to use for the FX Form.

    Sequence numbers control the order of FX Forms in lists. Refer to the sequence numbers article for more information.

  7. Click Save.

  8. Configure sharing settings to grant access to the FX Form configuration.

  9. Continue with Record Types.

Record Types

Set up record types if you need to complete FX Forms differently based on a certain aspect of a job.

Add Downstream, Midstream, and Upstream record types for an FX Form you complete differently at downstream, midstream, and upstream work sites.

Screenshot of different record types for an FX Form in FX Mobile

When you add record types, add a page layout for each record type. This allows you to display different fields on each version of the FX Form.

Add Record Types for an FX Form

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. From Setup, enter object in the Quick Find box, then select Objects.

  4. Open the FX Form object.

  5. Under Record Types, click New.

  6. In Existing Record Type, select "--Master--".

  7. In Record Type Label, enter the record type.

  8. Select Active.

  9. Click Next.

  10. Click Save & New.

  11. Repeat these steps for other record types as needed.

  12. Click Save to finish.

  13. Click Back to Custom Object at the top of the page.

  14. Continue with Add Page Layouts for Record Types.

Add Page Layouts for Record Types

Add page layouts for each record type:

Page layouts control the fields that display on each version of an FX Form.

  1. Under Page Layouts, click New.

  2. In Page Layout Name, enter the record type.

  3. Click Save.

  4. Drag fields onto the page layout.

  5. Click Save.

  6. Repeat for other page layouts as needed.

  7. Continue with Assign the page layouts to record types.

Assign the page layouts to record types

  1. Under Record Types, click Page Layout Assignment.

  2. Click Edit Assignment.

  3. Click the column header for the record type.

  4. In Page Layout To Use, select the record type’s page layout.

  5. Repeat these steps if other record types are needed.

  6. Click Save.

  7. Continue with Grant permission to use the record types.

Grant permission to use the record types

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set.

  3. Under Apps, click Object Settings.

  4. Open the FX Form object.

  5. Click Edit.

  6. Under Record Type Assignments, select the record types.

  7. Click Save.

  8. Repeat these steps for other permission sets as needed.