• Oscar Hernandez 18
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I'm trying to auto update a field on my accounts based on the last time a new opportunity was created for that account and on the account's annual revenue.  For example, account A has annual revenue greater than $250 million and hasn't had a new opportunity created in 2 months.  At the two month mark of no new opportunities, I'd like to update the account's "rating" field to a certain picklist value.  If the same account reaches the 4 month mark, I'd like to update the "rating" field again to a different picklist value.  If the account does not meet the annual revenue criteria (say it was under the $250 million threshold), then the trigger ignores it.  Any suggestions?  I'm new to triggers and apex code so would appreciate any help.  Thanks!