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
HareHare 

auto populating value url hacking not working in salesforce1 app

I hve overided Opportunity New Standedbutton with below VF page to prepopulate some values up on creating new record 
it is working fine for desk top but in salesforce1 not working please help me below is my code

<apex:page action="{!prepopulateValues}" standardController="Opportunity" extensions="MyControlleroppy">
</apex:page>
 
 public class MyControlleroppy
{

public opportunity oppty {get;set;}  

      
    private final Opportunity o; //Opportunity object
    
    //constructor
    public MyControlleroppy(ApexPages.StandardController standardPageController) {
        o = (Opportunity)standardPageController.getRecord(); 
    }
    
    //method called from the Visualforce page action attribute
    public PageReference prepopulateValues() {
        
        Map<String, String> passedParams = System.currentPageReference().getParameters(); 
        PageReference pageWhereWeEndUp = new PageReference('/006/e');
        
        pageWhereWeEndUp.getParameters().putAll(passedParams); 
        
        
            
        pageWhereWeEndUp.getParameters().put('opp3','Prospecting'); 
        pageWhereWeEndUp.getParameters().put('opp9',Date.Today().addDays(30).format()); 
        
        String dropSaveNew = pageWhereWeEndUp.getParameters().remove('save_new'); 
        String dropSave = pageWhereWeEndUp.getParameters().remove('save'); 
        
        pageWhereWeEndUp.getParameters().put('nooverride', '1'); 
        pageWhereWeEndUp.setRedirect(true);
        return pageWhereWeEndUp;
    }

}
GarryPGarryP
This URL hacking wont work in SF1 the way you are using it currently.
you will have to look out the solution that has been already explained beautifully by Bob Buzzard.

http://bobbuzzard.blogspot.com.au/2014/01/visualforce-in-salesforce1.html