I'm looking into how to change the owner of an opportunity through the Salesforce Console and a custom trigger.
As of right now I understand that in order to be able to change closed opportunities of an account's owners through this method, the "Transfer Closed Opportunities" check box must be checked, and the account owner must equal the opportunity owner prior to transfer of ownership.
If I want to transfer ownership of all closed opportunities(regardless of owner) given that the "Transfer Closed Opportunities" check box is checked, how can I accomplish this? Is there any way I can reference a field in apex that has this value(whether or not the Transfer Closed Opportunity box is checked) stored?
Any help would be greatly appreciated.