Question:

Salesforce1 looses the information about the parent Id

Lucy: 2 weeks ago

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().

Answer:
Athena: 2 weeks ago

I believe this is a known issue in Salesforce1 as I have encountered it as well. Here is another post (https://salesforce.stackexchange.com/questions/45733/salesforce1-how-to-reference-the-parent-id-on-new-action) which suggests that other users have faced it as well.