I need to add additional checkbox(Transfer open activities) to the Change Account Owner screen.
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)?
Best Answer
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 :