You need to sign in to do that
Don't have an account?
Shannon Andreas 1
Custom button to replace standard quote button
Hello!
I am trying to find a way to prefill fields on the Quote record with field values from the Oppty. The standard quote button pulls in the oppty and acct names automatically as it has a parent-child relationship. It also pulls in the Quote Line Items that are synced from the Products Line Items on the oppty.
I don't have anything to show here because I am not sure what to use to get this done. I was thinking javascript button, but then thought it might take apex code and a possible vf page. All of which I am pretty inexperienced with. I can probably wing the javascript as I found some basic code that might work (although I am having a hard time referencing the opportunity id and account id of the oppty to the Quote).
Can someone point me in the right direction? I would need a response that is somewhat detailed on how I can approach this.
Thanks for your help!
Shannon
I am trying to find a way to prefill fields on the Quote record with field values from the Oppty. The standard quote button pulls in the oppty and acct names automatically as it has a parent-child relationship. It also pulls in the Quote Line Items that are synced from the Products Line Items on the oppty.
I don't have anything to show here because I am not sure what to use to get this done. I was thinking javascript button, but then thought it might take apex code and a possible vf page. All of which I am pretty inexperienced with. I can probably wing the javascript as I found some basic code that might work (although I am having a hard time referencing the opportunity id and account id of the oppty to the Quote).
Can someone point me in the right direction? I would need a response that is somewhat detailed on how I can approach this.
Thanks for your help!
Shannon
Hi Shannon,
This can be accomplished using what's called 'URL hacking' As you guessed, you can create a javascript button on the opportunity object that executes javascript (specifically window.location = 'CUSTOM_URL'; ) where CUSTOM_URL looks something like the following:
/0Q0/e?retURL=%2F{!Opportunity.Id}&oppid={!Opportunity.Id}
You can find more information about this technique here:
http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
You can also prepopulate additional values by adding more URL parameters ( &XYZ={!Opportunity.Custom_Field__c} ) where XYZ is the field to be prepopulated, you may need to do some digging to discover what value to use here.
Does anyone have experience with this particular situation?
I see-perhaps someone else has experience traversing through relationships and can chime in. In the meantime I'd perhaps give {!Opportunity.Name} & {!Opportunity.Account.Name} a try for getting the opportunity & account names, respectively. Good luck!
Thanks again for your response Scott. I do appreciate it.