
I try to clear error and reset new value in post code filed update but not clear and not set new value. if input right code it’s ok but I input wrong code, i will raise error message and after I reinput the right code again it’s not clear error and not set new value.
protected virtual void _(Events.FieldUpdated<CRAddress.postalCode> e)
{
if (e.Row == null || e.NewValue == null) return;
e.Cache.RaiseExceptionHandling<CRAddressExt.usrDistrict>(e.Row, null, null);
if (postal.Length == 4)
{
string province = postal.Substring(0, 2);
string district = postal.Substring(0, 4);
e.Cache.SetValueExt<CRAddress.countryID>(e.Row, "KH");
e.Cache.SetValueExt<CRAddress.state>(e.Row, province);
e.Cache.RaiseExceptionHandling<CRAddressExt.usrDistrict>(e.Row, e.Row, null);
e.Cache.SetValueExt<CRAddressExt.usrDistrict>(e.Row, district);
}
}