You need to sign in to do that
Don't have an account?
Denise Crosby
trouble redirecting to event page on SF1 for event I created in custom controller
Hi. I have a VF page with custom controller on a global action to create an event. After saving, I need the SF1 mobile app to redirect to the event I just created. I've research this and tried several things, but nothing seems to work on mobile.
I tried the below in my save method, but I get "You can't view this page, either because you don't have permission or because the page isn't supported on mobile devices."
I tried the below in my save method, but I get "You can't view this page, either because you don't have permission or because the page isn't supported on mobile devices."
insert ev; PageReference nextPage = new PageReference('/one/one.app#/sObject/' + ev.Id); return nextPage;I've also tried this, but it does nothing:
insert ev; return new ApexPages.StandardController(ev).view();How can I get this working on a mobile device? Thanks !
- The Visualforce page must also have the "Available for Salesforce Mobile Apps" checkbox selected.
- Setup > Visualforce page > Edit
https://help.salesforce.com/articleView?id=Salesforce1-Are-Custom-Buttons-Links-Supported-in-the-Salesforce1-App&language=en_US&type=1Query editor: select id, name,apiversion,isavailableintouch from apexpage
isavailableintouch = true : available for the SF1
You can even update this value for many pages with SOQL or the dataloader without looking at every page manually (I had changed this value globally for my own needs)
On my custom VF page, I have "Available for LIghtning Experience, Salesforce1, and Lightning Communities" selected under Setup > Visualforce page > Edit. I don't think that's a problem because my custom page is displaying fine. It's only the redirect to the Event page after saving that I'm still trying to get to work.
I tried your code, but it still does not navigate to the event page.
Thank you for responding. I used your code and got the dreaded "You can't view this page, either because you don't have permission or because the page isn't supported on mobile devices." I think I better stick with my simple message and stay on the same screen for now. I have 1 day left until my demo. If the big bosses don't complain about it, I'll just go with that. Thanks again... I'd still like to figure out what the heck is wrong! BTW, I did Google the error message and found out this was a similar known issue that was fixed in Summer '16 patch?!?
https://success.salesforce.com/issues_view?id=a1p300000008Y8KAAU
Does the code you provided here work for your Salesforce 1 or in general, for Salesforce 1? It sounds like the problem could be with my Salesforce 1 specifically or my instance. If so, I will open a support ticket with Salesforce. Thanks again for all your great help.