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.

1 Answer 1


You just have to change OwnerId field on Opportunity

  • 1
    Right, I'm looking to change the OwnerId field on the Opportunity but for closed opportunities, I would only want to do this if the check box is checked. Any thoughts on how to reference the check box value?
    – James
    Commented Feb 4, 2014 at 9:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .