• Mo Syed
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
HI All 
Can anyone help with with a basic trigger please? 
Im an admin so not a dev. I am experienced in using Visual Flows and can fulfil most requirements using that, its incredibly powerfull. However it has a limitation, which is you cannot trigger a VISUAL FLOW AFTER DELETE of a record. 

Hence I need an example trigger. This is a good oppty for me to head over into the Dev side and learn since im limited by native automation. 
I have a object called
Bookings  (custom)- Associated to Account via Lookup 
On Delete of  a Bookiing record all I need is to Update the Account object a custom field called Recalculate

I have a visual flow when the Recalculate is TRUE it loops through all child records, aggregates and SUMS on the parent. Hence I need this Recalculate checked to TRUE on delete of Booking record. 

Can anyone kindly help with this basic trigger please? 

 
please correct this code and help me earn this badge ...have completed all tasks ..except this one ....

IF( MONTH( NOW() ) = 12,
  DATE( YEAR( NOW() ), 12, 31 ),
  DATE( YEAR( NOW() ), MONTH( NOW() ) + 1, 1) - 1