Installation and Setup > Configuring Mobile Apps > Customer Targeted Solutions
Customer Targeted Solutions
This article lists some scenarios and solutions for mobile apps based on the mobile app implementations to meet the business requirements of different customers.
The following topics are covered in this article:
Download All IBs In The User’s City Or Region
If user’s attributes are to be used to determine whether a record should be available in offline, formula fields can be created on the object. Following are the steps to be executed for downloading IBs in user’s City or Region, where Region__c is a custom field in User and Installed Product objects:
1. Create a formula field in Installed Product object:
Data type: Number with no decimals
Name: Download_To_Mobile
Formula: IF(OR($User.City = SVMXC__City__c, $User.Region__c = Region__c), 1, 0)
2. In Mobile Configuration, define Download Criteria for Installed Product with this expression: Download_To_Mobile = 1.
* 
In addition to or instead of user attributes, global or user-specific settings can be used in formula fields using Salesforce Custom Settings. Example: IF($Setup.Some_Setting_Collection__c.Some_Setting_Name__c = ‘Some Value’, 1, 0):
Soft Scheduling - Create Tentative Schedule In DC
You can create Tentative Schedule In DC, but not in Technician’s Ipad Calendar till it is official. You can achieve this by making use of setting SET012 (Event Criteria for iPad client, under module ServiceMax iPad Client, submodule Synchronization). Here are the steps to be executed:
1. Create a custom pick list field in BOTHSalesforce Event object AND ServiceMax Event object with the following attributes:
Field Label and API Name: Event Status & Event_Status__c
Picklist Values: Reserved, Confirmed
Use first value as default value: Unchecked
* 
This means there is no default value. If you edit any existing picklist value for the Event Status field later, ensure that you leave Make this value the default for the master picklist unchecked.
2. Include the above field in Dispatch Console Field Updates configuration screen (ServiceMax Setup home > Dispatch Management).
3. Set the value of Group Configuration setting SET012 (Event Criteria for iPad client, under module ServiceMax iPad Client, submodule Synchronization) for the required Group Profiles to this: and Event_Status__c !='Reserved'
4. When scheduling a Work Order Event, set Event Status field in Field Updates section to Reserved. If required, Event Color Rules can be defined in Dispatch Console, for displaying Reserved events in a different color in the Gantt for easy identification.
5. When it is required to confirm the schedule, edit the event and set the Event Status field to Confirmed. The next data / event sync will download this event to iPad. Note that not defining any default value for the Event Status field results in events created in iPad having Event Status set to blank. The condition Event_Status__c != 'Reserved' will ensure that any such events created in iPad will not disappear from iPad after sync.
If the requirement is that only the events with Confirmed status must be synced to iPad app, the condition can be changed to Event_Status__c = 'Confirmed'. This will also handle the use case where an event is created using Dispatch Console, with Event Status field not set to any particular value (as Dispatch Console does not enforce default picklist value) and such events should not be synced to iPad app.
Populate Closed By field on the Work Order
You can populate Closed By field on the Work Order with the user who is executing the SFM. This works in both iPad and online.
If the work order's Owner will be the same as the user executing the SFM, you can map Closed By to SVMX.CURRENTRECORD.OwnerId in the Work Order value map.
* 
Standard Salesforce workflow cannot be used because Closed By is a lookup field. Trigger-based solution is not preferred. SVMX.CURRENTUSERID cannot be used because iPad app does not support it.
Download IBs Associated With a User Using Salesforce Custom Settings
In Mobile Configuration screen, Download Criteria tab expression builder has been enhanced to support using of Salesforce Custom Settings: For any filterable text type field (e.g. text, text area, picklist), select the required operator, and enter the custom setting name in the Value field. The format to specify the setting name is as follows:
Hierarchy type setting: SVMX.SFCSH.<Custom Setting API Name>.<Custom Setting Field API Name> Example: Territory Equals SVMX.SFCSH.Covered_Territory__c.Territory_Name__c
List type setting: SVMX.SFCSL.<Custom Setting API Name>.<Custom Setting Field API Name>:<Name of the data set> Example: Region Code Equals SVMX.SFCSL.Region_List__c.Region_Code__c:North East US
* 
The Equals and Contains operators are supported on custom settings expressions in Download Criteria. Expressions which include custom settings are not supported in Advanced Download Criteria. No other app/feature in ServiceMax suite supports expressions that include custom settings.
An example usage of Hierarchy type of custom setting:
1. Consider a custom setting labeled Covered Territory (API Name: Covered_Territory__c) of type hierarchy, with custom field of type Text, labeled Territory Name (API Name: Territory_Name__c).
2. Set this to England for technician1’s Salesforce user and Germany for technician2’s Salesforce user. Both the technician users are associated with the same Salesforce profile and hence have the same ServiceMax group profile.
3. In the Mobile Configuration for the ServiceMax group profile of these technician users, Download criteria expression can be defined to match Installed Product custom text field Territory with this setting value, as follows: Territory Equals SVMX.SFCSH.Covered_Territory__c.Territory_Name__c
4. With the above configuration, following records get downloaded when different technicians login to the mobile app:
For technician1: Installed products which have Territory = England
For technician2: Installed products which have Territory = Germany
In older releases, formula fields had to be used for the above purpose. For the above example, a formula field of type Number (named Download To Mobile) had to be defined, with the following formula:
IF(Territory__c = $Setup.Covered_Territory__c.Territory_Name__c, 1,0
This formula field had to be included in the Download Criteria expression as follows:
Download To Mobile Equals 1
Extending the above example, if the covered territory were to be defined for the Salesforce profile instead of for the individual technician’s user record, setting definition and Download Criteria expression in mobile configuration would remain the same. It is just the setting data which would need to be defined for the required profiles, instead of for the individual users.
Once defined, records matching the territory name of profile1 would be downloaded for all the technician users associated with that profile; records matching the territory name of profile2 would be downloaded for technician user’s of profile2.
Was this helpful?