Troubleshooting: SFM Delivery
Error Message ‘List index out of Bounds - 0’ is Displayed on launch for some SFM Transactions
This happens when some SFM transactions are launched by clicking a custom Salesforce button and the button URL uses 15-digit ID (e.g. SVMX_recordId=Case.Id&x;SVMX_retURL=/Case.Id). To resolve the problem, use 18-digit ID (e.g. SVMX_recordId={!CASESAFEID(Case.Id)}&x;SVMX_retURL=/{!CASESAFEID(Case.Id)}.
Error 'Undefined' Displayed on Loading an SFM Transaction
Additionally, all the other fields display blank value. Clearing the ServiceMax Cache does not resolve the issue.
This can happen if one or more fields configured in the SFM are deleted.
In SFM Designer, edit the failing transaction, re-save all the associated configurations such as filters, maps, page layouts &x; lookup configurations, and data validation rules. Then re-save the transaction itself. Load the updated SFM transaction in SFM Delivery.
Some Labels in SFM Delivery are Displayed as SFM002_TAGnnn, instead of the Actual Label
Click the Clear ServiceMax Cache icon.
Query Failure on Launch/Save - Too Many Fields or Filter too Complicated
Some SFM transactions fail with the error 'Query is either selecting too many fields or the filter conditions are too complicated' on page load / save.
When this happens, use Field Sets to restrict the target object fields queried to consider only the fields required for the SFM transaction, instead of all the fields in the object which is the default.
Lookup Form-Fill Populates Lookup Field with Salesforce Id
Lookup field (for instance Product field) copied from looked up record (for instance, Installed Product record) to current record (for instance Work Detail) displays Salesforce Id when it is populated by Lookup Form-fill. How can this be corrected?
Add the lookup field (Product) to the Display field list in lookup configuration (for Installed Product lookup field).
Lookup Search Dialog Box Displays API Names Instead of Labels of Some Display Fields
Ensure that logged in user has field level access to the display fields.
Lookup Field Displays Blank Value after Selecting a Record in the Lookup Search Dialog Box
Ensure that the Display Field configured in the lookup configuration is included in the list of Display fields, by clicking the Add to result field list icon for that field.
Lookup search dialog box stops responding when you click the lookup icon to perform a lookup search
This can happen when the fields used in the filter criteria for the lookup field is not included in the SFM page layout. Ensure the fields defined in the filter criteria are added to the page layout as well.
Create/Edit Account SFM save failure_Account - Bad Field names on insert/update call
This can happen in orgs where Person Accounts are enabled. The root cause for this issue is that SFM Delivery considers all the fields in a target object by default, and some Account object fields are applicable to either Business accounts or Person accounts, but not both.
When this happens, use two Field Sets, one for Business account SFM transactions and one for Person account SFM transactions. This will restrict the target object fields queried to consider only the fields required for the SFM transaction, instead of all the fields in the object which is the default.
Newly added child records disappear after Quick Save, but are added in the backend
Check if the new records match the Qualifying Criteria for child object records.
Error message 'Object - id value of incorrect type - SVMX.CURRENTRECORDHEADER.Field Name' gets displayed on Page Save
This happens when the mapped fields are not included in the SFM page layout. Both the source and the target fields must be included in the page layout, when using 'SVMX.CURRENTRECORDHEADER' literal in value maps. If the target field value should not be changed by the user, mark it as a Read Only field in the SFM page layout.
I added some new picklist values to a field, but SFM Delivery screen still shows only the old values.
Click the button 'Clear ServiceMax Cache' at the top right in SFM Delivery screen. This is required after doing any data model changes in Salesforce for any object included in an SFM transaction.
Any object / field is not visible / selectable in SFM delivery / SFM designer
This can happens if any objects / fields have the same API name as any other object / field. Execute the same script below in the Developer Console / Workbench. If using Developer Console, run them with log level set to Warn for better results.
Script to find objects with duplicate API Names:
Apex
Map<String, Schema.SObjectType> allObjs = new Map<String, Schema.SObjectType>();
allObjs = Schema.getGlobalDescribe();
map<string, list<string>> mapObjAPINameObjList = new map<string, list<string>>();
for(String strObjName : allObjs.keyset())
{
if(!mapObjAPINameObjList.containskey(strObjName.remove('svmxc__')))
{
list<string> lstObjNames = new list<String>();
lstObjNames.add(allObjs.get(strObjName).getDescribe().getLabel() + ':' + strObjName);
mapObjAPINameObjList.put(strObjName.remove('svmxc__'), lstObjNames);
}
else
mapObjAPINameObjList.get(strObjName.remove('svmxc__')).add(allObjs.get(strObjName).getDescribe().getLabel() +
':' + strObjName);
}
integer cnt = 0;
for(String strObjAPIName : mapObjAPINameObjList.keyset())
{
if(mapObjAPINameObjList.get(strObjAPIName).size() > 1)
{
system.debug(logginglevel.warn, '=======' + strObjAPIName + ' is shared by multiple objects: ' +
mapObjAPINameObjList.get(strObjAPIName));
cnt++;
}
}
if(cnt == 0)
system.debug(logginglevel.warn, '=======No two objects share the same API Name');
Script to find fields with duplicate API Names in Work Order. For any other object, just replace SVMXC__Service_Order__c
in the first line with the required object’s API name.
Schema.DescribeSObjectResult objDescribe = SVMXC__Service_Order__c.sObjectType.getDescribe();
Map<String,Schema.SObjectField> fieldMapping = objDescribe.fields.getMap();
Map<String, list<String>> mapFldAPINameFullName = new Map<String, list<String>>();
for(Schema.SObjectField fieldMap: fieldMapping.values())
{
Schema.DescribeFieldResult fieldDescribe = fieldMap.getDescribe();
if(!mapFldAPINameFullName.containskey(fieldDescribe.getName().remove('SVMXC__')))
{
list<String> lstFldName = new list<String>();
lstFldName.add(fieldDescribe.getLabel() + ':' + fieldDescribe.getName());
mapFldAPINameFullName.put(fieldDescribe.getName().remove('SVMXC__'), lstFldName);
}
else
{
mapFldAPINameFullName.get(fieldDescribe.getName().remove('SVMXC__')).add(fieldDescribe.getLabel() + ':' +
fieldDescribe.getName());
}
}
for(String fldName : mapFldAPINameFullName.keyset())
{
if(mapFldAPINameFullName.get(fldName).size() > 1)
system.debug(LoggingLevel.Warn, '============API Name ' + fldName + + ' shared by multiple fields: ' +
mapFldAPINameFullName.get(fldName));}
Newly created SFM Wizard is not visible in SFM Wizard Delivery screen
This can happen in the following two scenarios:
• When the record does not match the criteria OR
• When there are multiple wizards configured for the object and the SFW section does not have a scroll-bar to list all the wizards in the record. In order to view all the configured wizards, enable Show scroll-bars from SFW Section properties in the Salesforce page.
Undefined error is thrown when Value Mapped is done on edit page layout
When you launch the Value Map test, undefined error is thrown. This issue may be due to several reasons out of which one may be due to incorrect value mapping.
Output Document Generation Failure
When you include multiple Checklist Attachment Answers in the Output Document, there maybe a case where Output Document Generation might fail due to exceeding Salesforce limits. It is therefore recommended to limit the inclusion of Checklist Attachment Answers in the Output Document, until necessary.
Error on loading SFM delivery “No such column <<API Name>> exists
This may happen when ServiceMax Literals are incorrectly configured in the SFM mapping of the SFM Transaction.
Example: Work Detail(Target) to Work Order(Source) mapping, where Source Literal is CURRENTHEADERRECORD.SVMXC_Service_Order__c
Please review the field API names used with the literals in the mapping in SFM Transaction Designer, correct them appropriately and save the SFM transaction.
Occasionally, opening an SFM transaction delivery shows an “Undefined” error
This can happen if a Date or Date time field is set to an incorrect value in the Mapping section of this SFM process in SFM Transaction Designer.
Review the SFM Maps to ensure correct values are set to the fields and save the SFM process.
Unauthorized Access error while configuring a source object update in the Transaction Designer even if the user has all the necessary access
SFM Wizard expression is not respecting "Not Equal To" operator when the value of the configured lookup field is blank.
Due to some technical limitation , "Not Equal To" operator is no longer supported in SFM Wizard expression. It is recommended to use "Not Null" operator instead of "Not Equal To" operator.
Lookup Configuration Changes are not Reflected on SFM Reload
If you are using any SFM that has lookup field configuration, when you change or update the configuration for the lookup field in the Designer and reload the SFM, the changes for the lookup field configuration are not reflected.
To avoid this issue, ensure that you save the page layout after saving the changes to lookup configuration in the Designer.
Image added to Rich Text Area Field are not Reflected on SFM Reload
The image added to the rich text is field displayed as broken. This was due to the Cross-Origin Embedder Policy (COEP) setting enabled which did not allow to load externally sourced embedded content like images, documents.
To avoid this issue, you must disable the
Cross-Origin Embedder Policy (COEP) setting under
Session Settings.