Custom HTML documents enable you to create your own tabs and pages within the Pulsar FSL SFS 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 SFS tab bar, as a card that exists on a particular FSL SFS object type, or that launches from the Lightning Bolt menu.
Custom Documents on the
...
SFS 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 SFS tabs or label : documentId
pairs that will link to your custom documents.
Warning |
---|
You must add all tabs that you wish to see on the tab bar to this setting. Failure to add a tab will exclude it from the app. This includes the standard FSL SFS tabs. |
Note |
---|
The keywords for the standard FSL SFS tabs are: Schedule, Inventory, Notifications, and Profile. |
...
The above values would place the standard FSL SFS 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 SFS 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.
...
Adding custom HTML as a card as part of the display of an FSL SFS 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 SFS objects that match the object type / record type pair that you define in the setting.
...
The above value for the setting would display the cards listed from top to bottom on all WorkOrder objects. This would place two custom cards containing the HTML you defined in the files pointed to by the documents listed to the right of the colons. The text to the left of the colons will appear as the title of the card.
Note |
---|
Standard FSL SFS 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 SFS 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 SFS Lightning Bolt Menu Customizations
...
The Pulsar Platform - JS Bridge API is fully accessible from any custom document running in the Pulsar FSL SFS environment.
Code Block | ||
---|---|---|
| ||
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 SFS in Pulsar. Outside of the FSL SFS 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
...
SFS Functions
In order to allow for rich user experience, Pulsar exposes a number of FSL SFS specific methods in addition to the bridge.
...
Documents are displayed within iFrames in the Pulsar FSL SFS 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 | ||
---|---|---|
| ||
// 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
...
SFS
One common way that information about various SObjects is displayed in Pulsar FSL SFS 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 SFS 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 SFS Screens and the data that feeds them for more information.
...
Customizing the SObject Page Carousel Items
...
In Pulsar FSLSFS, 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
.
...
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 SFS Schedule - Number of Days Before |
Key | pulsar.fsl.schedule.numDaysBefore |
Value | a number of days |
Default Value (if any) | Will use the value in FSL SFS mobile settings |
Description | Controls the number of days to display in the calendar navigation component before and after the current date. |
Notes/Comments | None. |
...
The + button on the Profile page in FSL SFS 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 FSLSFS. |
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 SFS 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 FSLSFS. |
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 | FSLSFS: Hide Schedule Page Directions |
Key |
|
Value | TRUE/FALSE |
Default Value (if any) | FALSE |
Description | Hides the Get Driving Directions option from Service Appointment item context menus on the FSL SFS Schedule page. |
Notes/Comments | None. |
...