SFM Issues
No View Process Found error
This happens when trying to open a record associated with an event or an SFM Search result record or a lookup record.
The reason can be one of the following:
View Record type SFM transactions are not downloaded to mobile app for the particular object
Depends on SFM Mobile Permissions configuration
Depends on permissions to objects referenced within the page layout of the SFM transactions
A record does not match the qualification criteria of any View Record type SFM transaction downloaded to mobile app for the particular object.
Lookup field displays SFID instead of Name field value
This can happen when the following conditions are true:
Automatic resolution of name field value does not happen during sync, if the object in which the lookup field is included has >35 custom lookup fields.
Additionally, the looked up record is not downloaded through Download or Advanced Download Criteria configuration.
It can also happen if the mobile user does not have access to the lookup object.
The first point above can be addressed by skipping automatic name field resolution for unwanted objects by editing the value of global configuration setting SET004.
Instead of updating SET004 or in addition to that, Advanced Download Criteria (preferred) or Download Criteria can be defined for the lookup object. This addresses second point listed above.
If the issue is due to lack of access, add permission to the object in the mobile user’s Salesforce profile.
Search does not display the same results as in online
This happens when all the records matching the search criteria are not downloaded to mobile app. Records are downloaded to mobile app based on Mobile Configuration, and not based on SFM Search configuration.
Any object / field is not visible for viewing and entering data
This can happen 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:
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() + ':' +
SFM Issues 141
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));
}
Was this helpful?