function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dawnzdydawnzdy 

trigger based on opportunity owner change won't work when transfer account

Hi all,

 

    I have a trigger to do a field update on another object(salesforecast) when opportunity owner is changed. It turns out it works only when the opportunity owner is changed manually. When the owner is changed due to the account transfer,  the trigger won't be triggered.

 

    Although the owner change will always show up in the I couldn't create trigger upon the OpportunityFieldHistory.

 

    Any work around for this? 

 

Thanks,

Dawn

sandersensandersen

There are a few cases where special functionality doesn't fire triggers as you might expect. It appears that this is one of these cases. The Salesforce.com team has been rooting these out over the years and making more and more of these events fire triggers. I don't know where this case is on the list, but I suspect you're not the first to identify it. I would check ideas.salesforce.com and vote for this idea, or post it if the idea isn't already up there.

 

Steve 

dawnzdydawnzdy

Thanks Steve!

 

I guess this is similar to the roll-up field, which won't have time stamp change so won't trigger triggers.

Thank you for your reply!

MSSBMeghanMSSBMeghan
This might not work, but have you thought of adding a custom field on the opportunity tied to a workflow that does a field update using the ISCHANGED() function?  Then you could set your trigger to fire off of the update to that field. 
dawnzdydawnzdy

Yes, I did tried to update another field using workflow fired by IsChanged(OwnerId), but it didn't work unfortunately.

 

Seems this change can't be captured by either trigger or workflow.