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
bharti mehta 4bharti mehta 4 

Does saveURL / retURL 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 : 
sforce.one.editRecord('<recordId>');
sforce.one.navigateToURL('/' + recordId + '/e?saveURL=%2F%2FsObject%2F' + recordId + '%2Fview');

For more detail : 
We have a related list  and a new button on that. On click of new we are redirecting to a vf page and inserting a new record and that taking user to the standard edit layout of the newly created record.
logontokartiklogontokartik
I dont thik the saveURL works, but what you can do is define a Pagerefence in the controller and then return it as part of action method and see if it works.
Something like

Pagereference retPage = new PageReference("/"+recordid);
retPage.setRedirect(true);
return retPage;


 
Gaurav KheterpalGaurav Kheterpal
The URL scheme is actually
<scheme>://sObject/<id>/view
<scheme>://sObject/<id>/edit
Refer this guide (https://na7.my.salesforce.com/help/pdfs/en/salesforce1_url_schemes_ios.pdf) for more details.

If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.

 
bharti mehta 4bharti mehta 4
Thanks Kartik and Gaurav Kheterpal for your responses !

But these did not work for me. I was able to redirect to view and edit pages. The issue was when I were on edit page and click on save. It took me to a blank page. Finally we have changed the solution to redirect to view page and let user edit it.
RishikeshRishikesh
Hi Bhartl,

did you get the solution for this ? if yes can you please share me ur code ? I am also facing the same issue 

Thanks
Rishikesh