You need to sign in to do that
Don't have an account?
Tyler Ball 1
How to override standard new quote button
My goal is to override the standard new quote button so that the expiration date on the quote defaults to today()+30. I don't want to use a workflow to accomplish this since I want the default expiration date to appear before the user saves the quote. I started creating the following visualforce page:
<apex:page standardController="Quote" showHeader="False" action="/0Q0/e?ExpirationDate={!TODAY()+30}
&oppid=006Z0000008JgXv">
</apex:page>
I got stuck because I don't know how to set the oppid to autopopulate with the associated opportunity id. I've just manually entered a static oppid to test with. Does anyone know how I would modify this code to populate the associated opportunity id automatically?
<apex:page standardController="Quote" showHeader="False" action="/0Q0/e?ExpirationDate={!TODAY()+30}
&oppid=006Z0000008JgXv">
</apex:page>
I got stuck because I don't know how to set the oppid to autopopulate with the associated opportunity id. I've just manually entered a static oppid to test with. Does anyone know how I would modify this code to populate the associated opportunity id automatically?
Hi Tyler,
Is this on a standard page or VF page? May be this blog post could be helpful to you:
http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
Thank you,
Sai
Behavior : Execute JavaScript
Display Type Detail page Button
and put the below in JS code
If this helps,please mark it as best answer to help others :)
try this one :-
If this helps,please mark it as best answer to help others :)
This would open the VF page you created,as you want this on the related list of Opportunity.
Then,you need to create a List button on Quote instead of Detail page button.
<apex:page standardController="Quote" showHeader="False" action="/0Q0/e?ExpirationDate={!TODAY()+30}
&oppid=006Z0000008JgXv">
</apex:page>
Like I said create a custom button which will open the VF page and use the merge fields which I suggested you to populate the Opportunity Id.
Hope this helps !!
<apex:inputField value="{!Quote.AccountID}"> </apex:inputField>
<apex:inputField value="{!Quote.OpportunityID}"> </apex:inputField>
Second, the Opportunity is field being displayed as a lookup. I really want to keep the standard functionality on New Quote that prohibits changing Account or Opportunity when clicking New quote.
I've also overriden Edit to the same VF page. When I open an existing Quote, both values appear in the page properly.
Any suggestions would be greatly appreciated.