Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Custom HTML documents enable you to create your own tabs and pages within the Pulsar FSL environment. These pages have full access to the Pulsar JSAPI bridge, enabling you to modify and display data as you see fit. You can add a custom document to the FSL tab bar, as a card that exists on a particular FSL object type, or that launches from the Lightning Bolt menu.

Custom Documents on the FSL Tab Bar

Adding a custom document to the tab bar is done through the pulsar.fsl.layout.tabs Pulsar setting. The values for this setting are separated by new lines and consist of a series of entries of either reserved words for standard FSL tabs or label : documentId pairs that will link to your custom documents.

...

The above values would place the standard FSL schedule tab at the far left, the inventory tab to the right of that and a custom tab with the label text “Create Order” in the third location that would link to a custom document pointed at by the Id 0696A000005Yr7i. The fourth tab in Pulsar’s FSL application is always labeled More. Any items after the third will be placed in a modal pop-up that is launched when the More tab is tapped.

Custom Documents as Cards within an Object Type

Adding custom HTML as a card as part of the display of an FSL object is done through the pulsar.fsl.{objectType}.{optionalRecordTypeDeveloperName}.order Pulsar setting. When you create this Pulsar setting you are defining all of the cards that will display when viewing FSL objects that match the object type / record type pair that you define in the setting.

...

Note

Standard FSL cards are: ServiceAppointment, Contact, Asset, WorkOrderLineItem, KnowledgeArticle, ServiceReport, ProductRequestLineItem, ProductTransfer, Parent, and TimeSheetEntry. Many of these may not make sense depending on the context (FSL Object) from which these cards are displayed. If the object context does not contain a relation to the standard card object, it may display no data.

You can add a generic related list card by referencing any valid related list object by the proper developer name. The object must be related to the pages WorkOrder or WorkOrderLineItem and must be synchronized within Pulsar.

Custom Documents on the Lightning Bolt Menu

See: Pulsar FSL Lightning Bolt Menu Customizations

Accessing the Bridge

The Pulsar Platform - JS Bridge API is fully accessible from any custom document running in the Pulsar FSL environment.

Code Block
languagejs
var bridge = window.parent.pulsar.bridge;

var request = { 
    "type"   : "read",
    "object" : "Account",
    "data"   : { "Name" : "John Doe Industries" }
};
bridge.sendRequest(request, function (responseData) { 
  alert('Request Result: ' + responseData); 
});
Note

This means of accessing the bridge is different from custom documents running outside of FSL in Pulsar. Outside of the FSL context, the bridge has not yet been initialized and registration code must be executed. Consider limiting your use cases to one style, though it is possible to create a hybridized bridge set up function.

Pulsar FSL Functions

In order to allow for rich user experience, Pulsar exposes a number of FSL specific methods in addition to the bridge.

Code Block
languagejs
var pulsar = window.parent.pulsar;

// Go back to the previous Pulsar page
// * only relevant to pages launched from a Pulsar SObject page
// * Tab bar pages will be the "root" of that tab, so back will be ignored
pulsar.goBack();

// Go home to the schedule page
// * useful if you navigate from one custom document to another
// * safe way to exist a stack of custom navigated pages
pulsar.goHome();

// Go back to the last non-custom-document on this tab's navigation history.
// * a user can create a series of custom documents which work together and
// and then call this method to dismiss them all and return to the initial
// page in the navigation history that launched the first custom document.
pulsar.goBackToTab();

// Open another custom document
// * Important - you must specify a document Id or title. If both are null,
// this method will fail, if you want to open by title, pass null for the Id
pulsar.displayContentDocument(aDocumentId, aDocumentTitle, { "someParameter": "a value" }, function () {
  alert("Document has been displayed.");
});

// Show/Hide a Spinner that disables the Pulsar FSL UI
pulsar.showSpinner();
// do some time consuming work
pulsar.hideSpinner();

// Set Page Title
// Custome pages will have an empty title unless set explicitly.
pulsar.setTitle("My Title");

// Show/Hide the Pulsar FSL navigation bar
pulsar.hideNavBar();
// Your page is responsible for re-displaying the navigation bar
pulsar.showNavBar();

// Create a named handler that will execute whenever a sync finishes
// IMPORTANT: Please clean up your handler as shown below.
pulsar.addSyncFinishedHandler('myHandler', function(syncFinishedInfo) {
  console.log('Sync finished with info!', syncFinishedInfo);
  pulsar.removeSyncFinishedHandler('myHandler');
});

// Create a named handler that will execute whenever a sync update event occurs
// IMPORTANT: Please clean up your handler as shown below.
pulsar.addSyncUpdateHandler('myHandler', function(updateInfo) {
  console.log('Sync updated with info!', updateInfo);
  pulsar.removeSyncUpdateHandler('myHandler');
});

Page and Component Resizing

Documents are displayed within iFrames in the Pulsar FSL document. The size of this iFrame is based upon the size of the content. However, there are cases in which a document may have a dynamic size or one that is created after the iFrame has sized itself. In these cases, we make use of the javascript postMessage function.

Code Block
languagejs
// Once you have determined the height you'd like the iFrame to conform to...
// inform Pulsar FSL of that height formatted as you would CSS.
var myHeight = "800px";

window.parent.postMessage({
  "type": "refresh",
  "height": myHeight
}, "*");

// Note: sending "*" as the origin is acceptable since this will never carry sensitive data

Changing the Number of Details Shown Throughout Pulsar FSL

One common way that information about various SObjects is displayed in Pulsar FSL is through what we call Display Fields. These fields are defined by the compact, search and related list layouts on those objects. We define the header as the first field in the set of fields on any of those layouts. We define the details as the remaining fields, excluding the header. Generally, whenever we show a list of details we separate them with a “•” (bullet character). By default, Pulsar FSL shows up to 4 detail fields in addition to the header. If an SObject does not have a value for a given display field, it will not show the field. It is important to make sure that your header fields are required fields or your users may have a confusing UI experience.

...

To determine where a set of details or a header is coming from, refer to Pulsar FSL Screens and the data that feeds them for more information.

 

 

Name

Number of Detail Fields

Key

pulsar.fsl.layout.detailFieldCount

Value

Number

Default Value (if any)

4

Description

Sets the maximum number of detail fields to be displayed.

Notes/Comments


Customizing the SObject Page Carousel Items

...

In Pulsar FSL, SObject pages have a series of tabs displayed in a carousel identified to the right. Three of these elements (Overview, Details and Related) are always present but there are four optional carousel items that may or may not be displayed when available to a given SObject. The Work Plans, Location, Products and Feed tabs are displayed by default but a user can select any or none of these to display with the following Pulsar Setting pulsar.fsl.layout.carouselItems.

...

 

 

Name

Customized Carousel Items

Key

pulsar.fsl.layout.carouselItems

Value

A list of valid values separated by commas or new lines. Valid strings are:

work-plans
location
products
feed

Default Value (if any)

work-plans
location
products
feed

Description

Use this setting to customize the set of carousel items on an SObject page in FSL.

Notes/Comments


Hiding the Assign Contact Button

The SObject overview page contact component will by default display a button to assign a Contact to the Service Appointment. Use this setting to hide the button if desired by setting the value to false.

 

 

Name

FSL: Show Assign Contact Button

Key

pulsar.fsl.layout.showAssignContactButton

Value

TRUE/FALSE

Default Value (if any)

TRUE

Description

Use this option to display/hide the assign contact button.

Notes/Comments


Hiding The Map on Service Appointment Overview Screen

Some customers have asked us if they can hide the map on the appointment overview screen because it takes a significant amount of screen real estate on phones. You can do this by specifying a Pulsar Setting in your org.

 

 

Name

Hide Map Component

Key

pulsar.fsl.layout.serviceappointment.displayMap

Value

TRUE/FALSE

Default Value (if any)

TRUE

Description

Use this option to display/hide the map component on the overview screen.

Notes/Comments

Users can still get Driving Directions by clicking on the button in the section.

Hiding Get Driving Directions Button on Service Appointment Overview Screen

This setting allows users to remove the Get Driving Directions button from the Service Appointment detail component on the overview page. It is important to note that this button is displayed by default.

 

 

Name

Hide Get Directions Component

Key

pulsar.fsl.layout.serviceappointment.displayDrivingDirectionsButton

Value

TRUE/FALSE

Default Value (if any)

TRUE

Description

Use this option to display/hide the get driving directions button on the overview screen.

Notes/Comments


Displaying Resource Absences in the Schedule

It may be useful to your users to see resource absences displayed in the Field Service Lightning schedule screen in Pulsar. You can achieve this through this setting. Resource absences will not display in the scrolling calendar navigation view as “dots” (implying the presence of a Service Appointment) but they will be shown in the list of events for a selected day and on the full calendar display.

 

 

Name

Display Resource Absences

Key

pulsar.fsl.layout.schedule.showResourceAbsences

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Use this option to display resource absences on the schedule view.

Notes/Comments

None.

Hiding the App Browser

 

 

Name

Display App Browser

Key

pulsar.home.toolbar.enableappbrowser

Value

TRUE/FALSE

Default Value (if any)

TRUe

Description

Use this option to display or hide the 9 squares icon on the bottom toolbar

Notes/Comments

None.

Overriding the Calendar Display Dates

Some users may wish to display more dates on the calendar navigation control – as well as more appointments and absences – than Salesforce field service mobile settings allows (45 days before and after).

 

 

Name

FSL Schedule - Number of Days Before
or
FSL Schedule - Number of Days after

Key

pulsar.fsl.schedule.numDaysBefore
or
pulsar.fsl.schedule.numDaysAfter

Value

a number of days

Default Value (if any)

Will use the value in FSL mobile settings

Description

Controls the number of days to display in the calendar navigation component before and after the current date.

Notes/Comments

None.

Displaying the Gantt Label for Resource Absences in the Schedule

If resource absences are shown in the Field Service Lightning schedule screen with the previous setting, they will display in the format of “RA: <unique RA #>”. Alternatively, you can choose to display the Gantt label in place of the RA number. You can achieve this through this setting.

 

 

Name

Show Gantt Label for Resource Absences

Key

pulsar.fsl.layout.schedule.showGanttLabelForResourceAbsences

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Use this option to display the Gantt label on resource absences in the schedule view.

Notes/Comments

None.

Displaying a Lightning Bolt Menu on Appointments in the Schedule View

It may be useful to your users to have quick access to the Lightning Bolt Menu for a given Service Appointment directly from the schedule and not have to click into the object itself. This can be achieved via a pulsar setting.

 

 

Name

Display Lightning Menu on Schedule Items

Key

pulsar.fsl.layout.schedule.showLightningButton

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Use this option to display a lightning menu button on each service appointment in the list of appointments on the schedule page.

Notes/Comments

None.

Hiding Empty Sections in Generated Service Reports

Service report generation can be customized to hide sections which lack data. Service report sections can be customized through templates on Salesforce.com. There are three types of sections – normal, related list, and signature. Pulsar allows you to hide normal or related list sections that contain only empty values or have no rows.

...

 

 

Name

Hide Empty Service Report Related Lists

Key

pulsar.fsl.layout.serviceReport.hideEmptyRelatedLists

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Hides service report related list sections that have no rows of data during service report generation.

Notes/Comments

None.

Hiding the Add Resource Absence Button

The + button on the Profile page in FSL can be hidden through the following setting:

 

 

Name

Hide Add Resource Absence

Key

pulsar.fsl.layout.profile.hideAddResourceAbsence

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Hides the add resource button on the profile page of FSL.

Notes/Comments

None.

Hiding the Add Product Request Line Item Button(s)

The + button (and larger Add Product Request Line Item button) on the Product Request page in FSL can be hidden through the following setting:

 

 

Name

Hide Add Product Request Line Item Button

Key

pulsar.fsl.layout.productRequest.hideAddProductRequestLineItem

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Hides the add Product Request Line Item button on the profile page of FSL.

Notes/Comments

None.

Hiding Get Driving Directions from the Schedule Page

Each Service Appointment on the schedule page has a context menu with some actions. You can hide the ‘Get Driving Directions’ action through the following Pulsar setting.

 

 

Name

FSL: Hide Schedule Page Directions

Key

  • pulsar.fsl.layout.schedule.hideDirections

Value

TRUE/FALSE

Default Value (if any)

FALSE

Description

Hides the Get Driving Directions option from Service Appointment item context menus on the FSL Schedule page.

Notes/Comments

None.

Hiding Create Service Report Buttons

A user may wish to hide the display of the Create Service Report button as well as the small “+” button on the service report component card. This may be useful when trying to control when users may create a service report. By hiding the buttons you can allow the user to create service reports only through a Service Report Flow.

 

 

Name

FSL: Hide Service Appointment Create Service Report Button

Key

pulsar.fsl.layout.serviceappointment.displayCreateServiceReportButton

Value

TRUE/FALSE

Default Value (if any)

TRUE

Description

Hides the “Create Service Report” and + button on a Service Appointment Service Report detail component card.

Notes/Comments

None.

Applying logic before allowing the user to create a Service Report

An admin might wish to apply some rules before allowing the user to create a service report. This uses Pulsar’s PSL capability to allow the PSL logic to execute and confirm all validations have been met before letting the user proceed to the service report signature capture step.  

 

 

Name

FSL: Allow Service Report Creation

Key

pulsar.fsl.layout.serviceReport.allowCreate

Value

TRUE/FALSE

Default Value (if any)

TRUE

Description

Executes the PSL logic before the service report shows. Otherwise, an alert window will show the error message to the user why they are not allowed to create a service report yet.

Notes/Comments

None.

Using Your Own Google Maps API Key

Luminix provides a limited but free number of Google Maps API requests per month to all of our users. This is a single pool of requests and will frequently run out before the end of the month and disable maps for all users using the shared pool.

...

 

 

Name

FSL: Hide Service Appointment Create Service Report Button

Key

pulsar.fsl.googleMapsAPIKey

Value

A string value for the Google Maps API key

Default Value (if any)

The default will resolve to the Luminix API key which has a limited number of uses and may stop working for you at any time.

Description

Enables you to control the access to Google Maps API. This is a paid feature that Luminix offers for free on a very limited basis. If you have many users, you will want to configure your app to use your own key.

Notes/Comments

None.

Use a different maps provider than out of the box options.

Some users may wish to use different sources for getting directions from within FSL. This is especially useful in countries where Google and Apple maps are not supported.

 

 

Name

Maps Provider - Bing

Key

pulsar.fsl.layout.mapsProvider

Value

Domain components of map API providers like: “maps.google.com” and “bing.com” and “cn.bing.com”. Others are not supported at this time.

Default Value (if any)

Description

Disables all map UI components in FSL and replaces the “Get Directions” feature with a direct request to directions from the supplied provider.

Notes/Comments

None.

Hiding Submit Button on TimeSheet Screen

A customer may wish to hide the Submit button on the Time Sheet screen because they have implemented a specific flow for it, so that it meets all the criteria. This setting will help do exactly that.

...