3

I have domain abc.force.com and registered two sites abc.force.com/account and abc.force.com/sevicecenters. Here account and service centers are my two communities.

I have created a visual force page and taken a button to redirect page. when I was on a community portal with a context url ("/servicecenters" in this case on sandbox) on salesforce one app. re-directions to visualforce pages are working fine but to standard (detail page in our case) is not working.

Please review my code.

-------------------------------------Running Code -------------------------------------
String urlToRedirect='apex/someVFP?id=a0Ee0000003c8v7';
PageReference page;
String strSiteUrl=Site.getCurrentSiteUrl()==null?'/':Site.getCurrentSiteUrl();//http://abc.force.com/sevicecenters/
page = new PageReference(strSiteUrl + urlToRedirect);
page.setRedirect(true);
return page;

Error after trying to redirect on standard detail page.

The page you are trying to access is not supported on mobile device

String urlToRedirect='a0Ee0000003c8v7';
PageReference page;
String strSiteUrl=Site.getCurrentSiteUrl()==null?'/':Site.getCurrentSiteUrl();//http://abc.force.com/sevicecenters/
page = new PageReference(strSiteUrl + urlToRedirect);
page.setRedirect(true);
return page;

This was working fine in before few days. I have tried various methods but fail to find appropriate solution to solve this.

Please help me to resolve this.

1
  • Can you provide an example of the URL when redirected on the desktop and then show the URL of the page when you are in Salesforce 1. Perhaps when comparing the two valid (but different) URL strings we will be able to determine the best call to make from the Visualforce page.
    – Joseph U.
    Commented Mar 30, 2015 at 0:00

1 Answer 1

2

I was checking yesterday the navigation issues I am facing with Salesforce1 in Communities and I came across this

Keep the following in mind when using the sforce.one object: Calls to sforce.one.navigateToURL may result in an “Unsupported Page” error if the URL references standard pages for objects or Chatter pages. To avoid this error, ensure that the URL begins with a backslash (/_ui instead of _ui). The sforce.one.createRecord and sforce.one.editRecord methods don’t respect Visualforce overrides on these standard actions.

maybe it can help you resolve your issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .