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.