Created
April 17, 2013 13:20
-
-
Save dancinllama/5404238 to your computer and use it in GitHub Desktop.
Apex code for implementing a custom clone quote button for Big Machines related work. The following takes a child opportunity and clones the Big Machines quote from the parent object onto the child opportunity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PageReferene pageRef = Page.BigMachines__QuoteEdit; | |
Map<String,String> parms = pageRef.getParameters(); | |
//Get First (Primary) Big Machine Quote From current Opportunity's parent opportunity | |
parms.put('Id',parentOpp.BigMachines__BigMachines_Quotes__r.get(0).Id); | |
//Clone the parent into the the current aka child opportunity. | |
parms.put('oppId',opp.Id); | |
parms.put('clone','true'); | |
return pageRef; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment