I have a custom object with some Record Types. This custom object has an overwritten New page.
This Visualforce page works fine on desktop but it don't work within Salesforce1.
The problem is that Salesforce1 looses the information about the parent object.
On my parent object I choose New Custom Object
and gets redirected to the Record Type Selection page, here I choose my Record Type and go on. I get redirected to my overwritten New page.
The Constructor of my Controller Extension tries to get the record information from the Standard Controller:
public with sharing class CustomObjectCtrlExt {
public CustomObject__c customObject;
private ApexPages.StandardController stdCtrl;
// CONSTRUCTOR
public ExpenseCtrlExt(ApexPages.StandardController standardController) {
stdCtrl = standardController;
customObject = (CustomObject__c) stdCtrl.getRecord();
System.debug('customObject: ' + customObject);
}
...
}
If I call this from my desktop browser I get the following debug output:
USER_DEBUG [16]|DEBUG|customObject: CustomObject__c:{RecordTypeId=012F0000001ILXW, parentCustomObject__c=a00F000000CKcSd}
If I call this from my Salesforce1 App I get this debug output:
USER_DEBUG [16]|DEBUG|customObject: CustomObject__c:{RecordTypeId=012F0000001ILXW}
So I don't understand why Salesforce1 can't get the information about the parent object via getRecord()
.