You need to sign in to do that
Don't have an account?
Swerz
Triggers do not fire
Hi Guys,
I wrote an 'after insert, after update' trigger on Opportunity, which updates a field(say, A) in Opportunity depending on the value of another field(say, B) on Opportunity. Now when I convert a lead, the opportunity gets created but the value of A doesn't update, though the value of B is flowing from Lead itself ie B is populated but the trigger doesn't fire resulting in no population of A.
Could anyone of you help me overcome this?
Thanks
what error you are getting?
Swerz,
I suppose you already tested it when creating a Opportunity manually and found out it worked ok then?
For Opportunities they changed the behavour in saving in the spring release, so depending on the field you are refering in your trigger it may or may not work. See spring09 release notes:
https://na2.salesforce.com/help/doc/en/salesforce_spring09_release_notes.pdf
Hi Dhooft,
thanks. You are right, I tested my trigger and it works fine if I manually create an Opportunity.
About the Spring release features, I guess, they are mostly about the child records and save behaviour if some change made to child records should be in sync with Parent record too.
My case is a bit similar to something I observed while converting a lead. Suppose a field X is mandatory on Opportunity. When we try to convert a lead, the resulting Opportunity gets created even without the field X being populated. The next time you try to edit and save the Opportunity though, it will give an error, that X is mandatory.
Actually, I tried making B mandatory in my case, hoping that it would trigger my trigger but the opportunity was created without the mandatory field being populated.
Hi Pal,
this might just be what I want!! But I do not see the option i nmy org. Could you pls tell me who to contact to get it done? I am an admin though. Is there any config change required?
Thanks
Just raise a case using the normal support route, and request that they enable "Enforce Validation and Triggers from Lead Convert" in the Lead Settings section.
Once it is enabled, a new checkbox will appear - check that, and any insert triggers on Contact,Account and Opportunity should then fire when a lead is converted...