New Opportunity Save Behavior is going live 1/4/2010
At this point, you should have received a dozen emails from salesforce.com about the changes to Opportunity Save Behavior. For most customers there will be no impact. However, if you have code or rules that involve Opportunities and their child records then you should probably keep reading.
The new change will treat a save to a child of an Opportunity as a save to the Opportunity itself. This means that if you add a new Line Item to an Opportunity, the Opportunity itself will be evaluated against validation rules, workflow rules, and triggers. On the surface this doesn’t seem like an issue. However, if you have old data that is incomplete and more recently created rules/triggers then you might get a headache the next time you do any mass data updates. For example, let’s say in June you added a validation rule on Opportunities that requires the Type field to be populated if the Stage equals “Closed Won”. That means that Opportunities older than June may not have the Type field populated. Now let’s say you want to mass update Opportunity Line Items switching out an old product with a new one. The changes for Line Items of an Opportunity with no value in the Type field will error out!
So what does this all mean? It means anytime you create a new rule/trigger you should also update your existing data to conform to it, which is a best practice anyway. It enables better reporting and prevents little headaches like this from happening.
Have you been affected by this new change? Let us know how in the comments.
Related posts:



December 30th, 2009 at 12:46 pm
I don’t expect to be affected by this change (because we don’t use Line Items or Schedules), but just wanted to comment that you did a great job explaining a change that can be quite confusing to understand. Thanks!
December 30th, 2009 at 12:54 pm
Thanks, that’s what we’re here for.
January 6th, 2010 at 10:11 am
Whenever I did a mass update on my opportunity or contract object, I would always be triggering some of my many validation rules. So now, I surround my validation rules with the following so my custom profile doesn’t trigger any rules.
AND($Profile.Id “00e30000000xxxx”,
validation rule here
)