I need to add additional checkbox(Transfer open activities) to the Change Account Owner screen.

Like this

As far as I know, there is no way to edit this standard functionality so I decided to create a custom one(create new button, VF page, apex controller).

But I have faced a problem - with custom functionality I can't update records without triggering fields validation: e.g if I set "Transfer open opportunities not owned by the existing account owner" as true, I can't update all related opportunities.

Is there a way to avoid validation rules in this case or maybe there is a special class to change account owner(like we have a class to convert lead)?

  • You could have a checkbox 'skip validation' the user could tick. Then add a condition to your validation rule such that when the value of 'skip validation' is true, the rule is skipped. Alternatively, you could set the record attributes to some value that will pass the validation.
    – Berg
    Commented Jun 3, 2015 at 13:03
  • Or even have the custom page/controller assume this is desired and update your WF/Validation rules to exclude records with that box checked
    – James
    Commented Jun 3, 2015 at 13:32

1 Answer 1


What kind of validation is the issue? Check in to the "immediate" attribute in VF (on command button, for example).

If that doesn't meet your needs, you can do the checkbox approach outlined by SFDC NOOB above. I would do it a little differently though :

  1. Use a custom VF page
  2. Set the check box to true when you do the insert (under proper conditions, obviously)
  3. Never expose this box on a page layout
  4. Reset the value to false (in a trigger or a 2nd update call in your controller)

You must log in to answer this question.

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