Can I use a workflow to capture the original field value when a field value changes?

geekygirly
geekygirly used Ask the Experts™
on
Hello,

If a user changes a particular field, can I capture the original field value using a workflow?  Ideally, I would like to append to the notes field, like "Field1 changed to Field2 by User1" with a date/time stamp, but I don't think the workflows will append to notes.  

Another option would be to send an email when the field changes with same info.

Is this possible within CRM 4.0?

Thanks!
gg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi,

You could achieve this by writing a custom workflow plugin (by creating a general plugin) that could be triggered by "Record attributes change" option for the workflow. you could also make use of Annotation class (refer SDK)  in the custom workflow to append the text for the record.

To capture the text of a field is modified or not, you could write a simple onchange event script to trap the value in a hidden field and compare those two fields in custom workflow plugin. refer email creation in  the SDK to create a email accrodingly.

Hope it helps
Commented:
Not sure why you can't use Workflow?

Create Record - Note.

So you will still need to use Javascript in the OnLoad to populate hidden "Old Value" fields.

Author

Commented:
Thanks, this was a perfect simple solution - I just used the new field instead of both, but that will work because every change will now be in the history.  I'm sure the other solution would work as well, but this fast and simple.  I didn't realize you could add a new note via create record.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial