• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Visualforce

Tip#16 – Overriding Standard New button

10 Tuesday Nov 2015

Posted by Mani in Visualforce

≈ 1 Comment

Tags

Alert on new button, Override New button, Visualforce

Suppose, you have created a flow which will create Opportunity and this process is invoked by a custom button (Create Opportunity) on the Account object. In this case, you might want to override New button available in Opportunity tab(Recent records) with the Visualforce page and clicking on it, should throw an error message saying that Opportunity can be created by clicking on Create Opportunity button in Account record.

Also, provide a back button in the VF page and code for the same is given below:


<apex:page standardController="Opportunity">
<p>You cannot create an opportunity from here, instead click on Create Opportunity button by going to Account Detail page.</p>
<apex:form>
<apex:commandbutton action="{!cancel}" value="Return" rerender=""/>
</apex:form>
</apex:page>

Blog Stats

  • 67,604 hits

Archives

Recent Posts: Salesforce Everywhere

Lightning component to filter Products and display results in lightning data table

Lightning Components contd..

Introduction to Lightning Components(Aura Components)

Duration of the events in the Salesforce calendar can’t go beyond 14 days

Tip # 25: Error in creating Lookup relationship

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Developer links

  • Salesforce Developer website
  • Salesforce Success Community

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy