Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Here i have issue regarding workflow or trigger.On Account level i have 2 fields..

1) Account note - text field

2) Account note modified date - date field

I want the Account Note Modified Date field to be updated with the current date when an Account is created or an Account is edited and the Account Note is modified.

SHould I use a workflow or a trigger?

Which one is more suitable? If workflow then can you help me with the criteria?

share|improve this question
add comment

2 Answers 2

You could do this very easily with a Work flow rule.

Set up a Work Flow rule on the Account object.
Set the Evaluation Criteria to: created, and every time it’s edited In the Rule Criteria, set it to run if the formula evaluates to True

Set your formula to below

OR(
     ISNEW(),
     AND(
          NOT(ISNEW()),
          ISCHANGED(Account_Note__c)
     )
)

Then create a Workflow action of type, field update.

Set the the your Account note modified date field to

TODAY()

Save and activate the rule.

Now everytime an account is created this field is set to the current date, and if the account is edited and the Account Note field is edited, the field will be set to the current date.

Hope that helps.

share|improve this answer
add comment

If you are just trying to track the history of the Account Note Field, you could add history tracking to the Account Note field. Then every time that field is updated you would have a list of who did it, and what date/time. This would require no workflows or triggers and would remove the Account Note Modified Date field.

See: https://help.salesforce.com/HTViewHelpDoc?id=tracking_field_history.htm&language=en_US

share|improve this answer
    
Thanks for your prompt response....but here Account note modified date is necessary so i can't remove that field...and i want to print note modified date on that field....so what can i do for the further process –  Vivek113 Jun 24 at 22:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.