• Pamela Lauw
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I've created a VF page and controller to override the standard "new" button on the Opportunity Home Page.  The intention is to pre-fill the close date with a relative date value (Ex. Today's Date), but for some reason when I use the Opp9, it prefills with an exact value (Ex. puts in as text {!Today()}.  I am not great with code, and I've thankfully been able to trial and error a lot from the community. Help please!

My Controller is as follows:

public class RedirectNewOpptyController {
    public RedirectNewOpptyController(ApexPages.StandardController controller) {
    }
    
    public pagereference navigateToURL(){
        return new pageReference('/setup/ui/recordtypeselect.jsp?ent=Opportunity&opp9={!Today()}&nooverride=1&retURL=%2F006%2Fo&save_new_url=%2F006%2Fe%3FretURL%3D%252F');
    }
}
 
 
I've created a VF page and controller to override the standard "new" button on the Opportunity Home Page.  The intention is to pre-fill the close date with a relative date value (Ex. Today's Date), but for some reason when I use the Opp9, it prefills with an exact value (Ex. puts in as text {!Today()}.  I am not great with code, and I've thankfully been able to trial and error a lot from the community. Help please!

My Controller is as follows:

public class RedirectNewOpptyController {
    public RedirectNewOpptyController(ApexPages.StandardController controller) {
    }
    
    public pagereference navigateToURL(){
        return new pageReference('/setup/ui/recordtypeselect.jsp?ent=Opportunity&opp9={!Today()}&nooverride=1&retURL=%2F006%2Fo&save_new_url=%2F006%2Fe%3FretURL%3D%252F');
    }
}