+ Start a Discussion
Nikunj VNikunj V 

Salesforce1 PageReference Problem

I am redirecting to tab on button click. That is working find on desktop version. but when i use it on mobile , it is opening new window in google chrome and displays nothing .
Here is my code :
 
public pagereference Back() {
        Schema.DescribeSObjectResult anySObjectSchema = Project__c.SObjectType.getDescribe();
        String objectIdPrefix = anySObjectSchema.getKeyPrefix();
        PageReference ref = new PageReference('/'+objectIdPrefix);
        ref.setRedirect(true);
        return ref;
    }


And i am also showing alert box on some codition. it is working find in salesforce desktop but no alerts are shown on salesforce1.


Thanks for the help

 
ShashankShashank (Salesforce Developers) 
Please see if this helps: http://salesforce.stackexchange.com/questions/30749/salesforce1-navigation-with-apex