Override "New" Action

Kaede HollandKaede Holland ✭✭✭✭
edited December 13, 2019 in Questions
Would love to do an override for the "new" action. You guys have great tutorials for view/edit and tab - but not for new. Can you help?

Comments

  • Anna WiersemaAnna Wiersema 🛠️ 
    edited December 13, 2019
    For sure, Kaede, I'll work on making a "new" override tutorial. The process is basically the same:
    1. In Setup, create a Visualforce page for your New Page.
    2. Are you using page assignments?
      • If you are, then use this markup for your page, substituting the name of your object (like Project__c) for "Holiday__c."
      • If you're not using page assignments, use this one (substitute your own object and page name):
    3. Then, go to Create > Objects [or Customize > Object for standard objects] and click on the object this new page is for. In "Buttons and Links," click Edit next to the New action, and select your new VF page for the override
    Does that make sense? Let me know if this doesn't work or if you have any more questions.
  • Anna WiersemaAnna Wiersema 🛠️ 
    edited December 13, 2019
    Also, if it doesn't work, try changing {!redirect}? to {!redirect}& or vice versa. That's what always gets me. Also, your new tutorial is online now!
  • edited December 21, 2016
    For a new page, the syntax should be action="{!redirect}?objectType=Account&actionType=New", if you're using Page Assignments, or action="{!redirect}?page=NewAccount", if you're just doing simple redirects.
  • edited September 3, 2015
    Hi Zach,
    Is it possible to have two action types in the same VF page i.e. New as well as edit?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!