You need to sign in to do that
Don't have an account?

Parts of ZipCode field values to be updated/removed and reflected
Hi,
I have a ZipCode field on a VisualForce page whose requirement is that even if part of zipcode is removed/updated/added, we have to send email to say record owner saying what was removed/updated/added. But please mind that whole of zipcode does not need to be sent as it may be long. Only the updated part needs to be sent as email message.
Examples:
1) If I have ZipCode initial value as : 11,22,33,44 and now I change to 11,22,33 mail should be that 44 is removed from ZipCode.
2) If I have ZipCode as : 11,22,33,44 and now I change to 11,22,33,55 mail should be that 44 is removed and 55 added to Zipcode.
3) If I have ZipCode as : 11,22,33,44 and now I change to 11,22,55,66 mail should be that 33 and 44 are removed and 55 and 66 are added to Zipcode.
Can I achieve this functionality without much pains if possible?
Thanks,
Vimal
Vimal,
i would suggest you can do this in a trigger!
You can get the old value using "Trigger.oldMap" and compare with the changed value. In the end, it would need some IF-ELSE statements and you can write the requisite logic to send the email.
Cool_D