+ Start a Discussion

Qurik on Lead status after conversion

Has anyone run into this one....


On a Lead After Update trigger....


When a conversion has just occurred (new lead IsConverted is True, old lead IsConverted is false).....


No opportunity is being created....


The user sets the Conversion status (which maps to lead status) to any value....


The lead status is NOT set to the conversion lead status when you examine the lead.status in the Trigger.New collection.


However, if you query the same lead object during the trigger, the lead status HAS been updated to the conversion status.


Is this a feature? (and if so, why?)

Is it a bug?





In the query if you want to get the old values then you have to use the before update



After update means, your record has been saved to the database and you are querying the latest values, due to this you are getting the convertedstatus as true


Yes, I agree. The converted status is true, as I would expect it to be. But this does not address my issue.


The issue relates to the lead status value. Because after update I would expect to see the latest value (which is the conversion status specified by the user). But when I look at the lead status value provided by the trigger (trigger.new), it contains the old value, not the new value.


This is perplexing.