I am creating a custom object record via a flow. At the end of the flow, the user is redirected to the detail of the record that has just been created in order to add some attachment.
Users will use the functionality via Salesforce1, so I was wondering if it was possible to redirect the user to the mobile layout of the record. I have the id and tried with the following code in my getFinishLocation() method:
mobileParam = apexpages.currentpage().getparameters().get('t'); result = new PageReference('/one/one.app#/sObject/'+flowPageName.objectId+'/view?t=/'+mobileParam);
but it is not working from salesforce1. How can I redirect to the mobile detail page of the created record?