Best Practices
This section lists best practices to be considered when designing SFM transactions, to utilize the various features in SFM more effectively. his section lists best practices to be considered when designing SFM transactions, to utilize the various features in SFM more effectively.
• Do not use the same API name and/or label for two fields or objects. This usually happens when the label/API name of a custom object or field created has the same name/label as an object or field in ServiceMax package. SFM does not support this because of technical limitations, both in Designer and Delivery, and in the online application and mobile applications.
• Use maps, lookup form-fill, source object update, and target object update for automatic update of fields in required records. This increases efficiency and data integrity.
• Use SFM Data Validation Rules instead of Salesforce Validation Rules wherever possible. This has the following advantages:
◦ The rules are applied in both the online application and mobile applications.
◦ The rules are applied before saving the record, and hence no web service call is triggered to Salesforce.
◦ Prevents data entry errors at the earliest possible stage, increasing the probability of successful save.
• Use lookup field features Multi-Add Using and Form-Fill where possible, to enable adding multiple records and autofill required information quickly.
• Limit the number of web services, especially at the field level. Try using a combination of other features instead.
This is because of the following reasons:
◦ Each web service call includes a round-trip to Salesforce with added network latency, impacting performance.
◦ Only After Save web services are supported by mobile applications.
• Do not encode the following with HTML tags or use JavaScript code:
◦ Error messages and warnings (including messages coming from Salesforce Validation Rules and SFM Data Validation rules)
◦ Custom labels
◦ OPDOC delivery
• Do not use Formula fields for display criteria. Formula fields do not populate the information until the SFM is saved. Instead, use Text fields that have values that do not need to be calculated. You can map the Text fields to object fields, and that will allow the display criteria to obtain information from the field.