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
AgadenAgaden 

? About adding a date stamp to a text field

Im not sure if this is possible or not.  Essentially what we have is a textbox field on the opportunity form where folks can put in some free form notes about the opp.  I'm looking to see if there is a way to have the current date populate into the text field when the user clicks into the field to add some notes.
 
I'm thinking it may be able to be done with an S-control and Im just looking for a little guidance/advice on if something like this is possible.
 
Thanks,
 
 
NazeerNazeer
We can do this by workflow - field update.. use Today()
~ Nazeer
jpizzalajpizzala
Do you have the Notes & Attachments related list enabled in the Opportunity Page Layout? If so, this may be a better option than having a growing notes field on the Opportunity itself.

As a separate object, the Note will have all the standard Salesforce meta fields ( Created Date, Last Modified Date, etc. ) applied automatically so you won't have to worry about additional configuration.


Message Edited by jpizzala on 04-04-2008 04:26 PM
AgadenAgaden
Thanks for the info.  We are using notes/attachments.  The reps like having a place to enter notes right into the opp itself -- go figure :)
jpizzalajpizzala
With some trickery and a couple minutes of training for your team, you can implement this using workflow, as Nazeer mentioned above. You will need EE or above to implement workflow rules. Here is an example as to how to set it up:

  1. Create a new workflow rule on the Opportunity object
  2. Have the workflow evaluate every time a record is created or edited
  3. Run this rule if the following formula evaluates to true:
    1. AND( NOT( ISNULL( Notes__c ) ) , Notes__c <> '' , ISCHANGED( Notes__c ) )
    2. Basically, this will update the field if the field is not empty and its value is different than the previous value (assume the field name is Notes__c)
  4. Add a field update workflow action that will update the Notes__c field
  5. Use the following formula to set the new value:
    1. TEXT( TODAY() ) & ': ' & Notes__c
  6. Save and activate the workflow
Now for the team training. Since this will add a date stamp to the BEGINNING of the Notes__c field, you will have to have your team always add new notes ABOVE their previous ones (all in the Notes__c field, of course).

For instance, say the current value of the notes field is:
  • 2008-04-06: Here are some notes that I typed on April 6, 2008
So when adding a new note, you will simply put the new stuff before the existing stuff like so:
  • Here is a short little note blah blah blah
    2008-04-06: Here are some notes that I typed on April 6, 2008
And when you save the record, the workflow rule will evaluate and add the date before the new note automatically so the field will end up looking like:
  • 2008-04-07: Here is a short little note blah blah blah
    2008-04-06: Here are some notes that I typed on April 6, 2008
Hope this helps!
AgadenAgaden
Thank so much!  Exactly what I needed!