Showing results for 
Search instead for 
Did you mean: 
Product Team
Product Team

JavaScript Snippets...Contd

I wanted to continue writing about the new capabilities we plan to introduce with regards to supporting custom JavaScript snippets on mobile apps. 

FSA and ServiceMax Go apps have started to support custom JavaScript snippets and allow you to query data from the offline database, I’d like to call this "Snippets-Phase1". This proved very useful for custom data-validations even when the user is offline and avoid conflicts (See this thread for details : Snippets-Phase1)

With the objective of extending this framework further, we plan to introduce "Snippets-Phase2" where you can update the data within the “context” of an SFM. This means, you can use your custom logic and update data that you get using the API $sfm_records. Note that data you update is not limited to the fields in the SFM page layout, which just means you do not have to change any page layouts of the SFMs to leverage this.

This capability could help boost productivity of technicians using the app by say pre-filling appropriate data without having the technician to do it. For instance, when a technician debriefs, the timestamps can be set automatically using custom logic. Towards, it also solves use cases outlined in these ideas


Other use cases could be

  • Update the “earliest start date” of a Work Order by picking the earliest timestamp on its Labor lines.
  • Update the “completion date” of a Work Order by picking timestamp on the last Labor line.
  • Update an existing travel line with the End Time when the technician arrives onsite.
  • Combine this with APIs to query information from offline database and get creative! …. and many more.

Snippets-Phase2 is planned to be made available in 19.2 FSA. ServiceMax Go app and web will follow. Do you have more use cases that snippets can solve for you? Please share them here!

Looking further ahead, we plan to extend this further to allow database manipulations in offline scenarios and this could happen outside the scope of the SFM itself. Do you have use cases for them? Love to hear!

Message 1 of 3
2 Replies
Product Team
Product Team

Re: JavaScript Snippets...Contd

@mlounas @frank_vanloon  @smusku @mmajerus6 @asamma  Tagging key members who expressed interest in the previous blog.

Message 2 of 3
Pastry Chef smusku
Pastry Chef

Re: JavaScript Snippets...Contd

@archana_krishna Thanks for the update. These are really good features and would help us to do customization and automation in Mobile Apps now. We will explore these features in coming days and let you know for issues.

Message 3 of 3