function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
iGrafxAdminiGrafxAdmin 

Trigger a new enhanced note when Lead custom field changes

We're using the web to lead feature on our website on a "Contact Us" form.  The external user fills out the form and submits it.  One of the fields goes into a lead custom text field ("Comments").  Since this field will be overwritten (if the same lead fills out the contact us form again), I thought I'd try and trigger a new note to be created when the comments field changes.  This way we'd have a history of the previous web comments from that lead.  I've created a  basic before update trigger on a lead in our sandbox and it seems to be working fine.  I'd ideally like to create an enhanced note instead of the legacy note as the title and body of the enhanced note are visible in the related list whereas only the title is visible in the legacy note related list.  I can't seem to figure out how to create an enhanced note via a trigger though.  Any guidance would be appreciated.

Thanks,
Jared
Chris Gary CloudPerformerChris Gary CloudPerformer
Have you tried the Process Builder.  Set it to run on the Lead Object when the Lead is updated, then in your process, you can choose to create a "new Enhanced Note" record, and set the values accordingly. I hope this helps you. More information about the Process Builder can be found here:

https://help.salesforce.com/HTViewHelpDoc?id=process_overview.htm