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
JesseAJesseA 

Custom javascript button to create Contact & OpportunityContactRoles

Is it possible to have a custom javascript button which can create and insert a Contact and OpportunityContact Role records, then make a page callout to a visualforce page which will use those OpportunityContactRoles and then lastly delete the Contacts?

 

If so does anybody have any examples of something like this? Creating a Contact from a javascript button? 

 

Maybe it would be easier to create a visualforce page/controller that did the work in apex.