function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RishikeshRishikesh 

Does retURL/saveURL work in salesforce1?

I have a problem in salesforce1.
We are redirecting to a record's Edit from a custom vf page and it opens too.But when we click on save it takes to a blank screen.
We have used below code: 
window.parent.location= "/one/one.app#/sObject/"+"{!conId}"+"/edit?nooverride=1&retURL={!conId}";

any help could be appreciate !!
NagendraNagendra (Salesforce Developers) 
Hi Rishikesh,

I don't think the saveURL works, but what you can do is define a Pagerefence in the controller and then return it as part of an action method and see if it works.
Something like
Pagereference retPage = new PageReference("/"+recordid);
retPage.setRedirect(true);
return retPage;
The URL scheme is actually
<scheme>://sObject/<id>/view
<scheme>://sObject/<id>/edit
Refer to this guide for more details.
  • https://na7.my.salesforce.com/help/pdfs/en/salesforce1_url_schemes_ios.pd
Hope this helps.

Thanks,
Nagendra
RishikeshRishikesh
HI Nagendra,

Thanks for your response, actually we have override standard 'Edit'  button of Contact object so here it is not possible to use Pagerence method