function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Data Migration 5Data Migration 5 

Button Logic to default values on new opportunity

I'm looking for sample logic for button to create an new opportunity from customer/account. When the user clicks on button on customer/account, screen should provide options to choose record type and then show page layout for opportunity with defaulted customer/account lookup and owner to be defaulted as customer record owner. How can we accomplish this with simple logic?
 
Andy BoettcherAndy Boettcher
Publisher Actions are your best bet for this - you may see some articles on URL button hacking, but don't go that route.  As soon as you try to use this in Salesforce1 or Lightning Experience it will fall apart if you go the URL hacking route.

Here is a great intro video on Publisher Actions:  https://www.youtube.com/watch?v=4oKlWBKRr18