2

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

1 Answer 1

3

I believe this is a known issue in Salesforce1 as I have encountered it as well. Here is another post which suggests that other users have faced it as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.