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?

  • Is your detail page VF or standard page? – Mohith Shrivastava May 9 '15 at 20:32
  • standard page, not vf – tony danza May 9 '15 at 20:42
  • please redirect to normail detail view with just pagereference method pointing to Id of the record .When you test in SF1 it should redirect to the mobile View.THanks – Mohith Shrivastava May 9 '15 at 20:44
  • I already tried with result = new PageReference('/'+flowName.objectId); but i dont see the mobile version from sf1 – tony danza May 9 '15 at 20:53
  • Make certain the standard page you're redirecting to is enabled for SF1. – crmprogdev May 11 '15 at 14:01

Your Answer

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

Browse other questions tagged or ask your own question.