I'm trying to figure out how to create an opportunity page that will have the exact same fields as an old opportunity page except that it will have a different Id. That's it, only the ID should be different, the rest should all be the same. All the fields and their values that were in the old Opportunity should carry over to the new Opportunity. What's the proper method of doing this?
This isn't for a trigger, I'm creating a custom button in Salesforce that requires this as one of its functionalities.
Basically this is how that button should work. The button will be on an entitlement page.
- Put the button in Entitlement Page
- Click on the QuoteCalculator button (the button that I have to create)
Takes you to a visualforce page where you can select Assets for which you can create a Quote.
After selecting these assets, it will take you to a brand new Opportunity page. This new opportunity page has the same fields and values as the Old Opportunity page which is linked to the Entitlement page from the beginning. Inside the opportunity page is a brand new Quote based on the Assets that were picked.