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
Rung41Rung41 

Trigger help - Delete values in a field at a specific time

I need help writing a trigger that will delete the values in a field at a specific time.

Basically the way it would work is that if Account field "A" is populated then delete the  the values in the Account fields B,C,D,E to 0.00 at 11:59PM.

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
sherodsherod

So, you are saying, at every day at 11.59 pm, wipe fields B,C,D,E if A is populated?

 

You might need to have a look a Scheduled apex running each day.  But you can only run at a time window, you can't hit run it on a specific minute, as scheduling isn't refined enough.

All Answers

sherodsherod

So, you are saying, at every day at 11.59 pm, wipe fields B,C,D,E if A is populated?

 

You might need to have a look a Scheduled apex running each day.  But you can only run at a time window, you can't hit run it on a specific minute, as scheduling isn't refined enough.

This was selected as the best answer
Rung41Rung41

Yep. Thats what I want to do. I just have no clue how to write a trigger for that.