+ Start a Discussion
James L.James L. 

Bug in before edit trigger context variable for lead standard Address field?

Not sure if it's I have not background or it's a bug. Here how I found out:  In Lead Before Edit trigger StateCode, CountryCode are correct, with expected changed value; but State, Country are incorrect, with unchanged values. State, Country are updated to new values in Lead after edit trigger though. Any idea?
Hargobind_SinghHargobind_Singh
What you are encountering is the real behaviour. I think this could be because State and Country picklists are derived from Code, which doesn't happen until the values are saved. 


Kenneth JensenKenneth Jensen
Was facing the same bug after activating country and state picklists. The issue is that the State and Country fields aren't changed by the time before triggers are called, only the CountryCode and StateCode fields. It wouldn't hurt if this was documented more clearly in the list of considerations before changing to picklists for country as it affects all logic that is based on country changes.