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

Dynamically field update check using custom settings
Hi All,
I need a help regarding Custom Settings.In Contact we have fields like Firstname,lastname,Email,City etc.So i will store this specified fields in a custom settings (because in future these fields may be change so storing in custom setting )So whenever only this specified field values are updated in contact then only i need to create a record into another object .If other fields are updated it shouldnot trigger.I am not sure how to compare these field changes through Custom Settings and object Contact.
Anyone can give me some idea to get this scenario done.
Thanks in advance
I need a help regarding Custom Settings.In Contact we have fields like Firstname,lastname,Email,City etc.So i will store this specified fields in a custom settings (because in future these fields may be change so storing in custom setting )So whenever only this specified field values are updated in contact then only i need to create a record into another object .If other fields are updated it shouldnot trigger.I am not sure how to compare these field changes through Custom Settings and object Contact.
Anyone can give me some idea to get this scenario done.
Thanks in advance
All Answers
If your need is to trigger a piece of code only when some FIELD values are changed on Contact then here is the approach.
- Create a FieldSet on the Contact and name it appropriately.
- Add the fields you want to track updates to this new FieldSet
- Programatically retrive the FieldSet fields and check if it is modified or not and do whatever you want to do on modify.
Syntax for retriving FieldSet: