You need to sign in to do that
Don't have an account?

Trigger to sort the records based on created date
There is custom obj and have a checkbox .
I want to sort the records based on Created date.
The checkbox should be checked for the record if created date is the oldest among the list of records.
I want to sort the records based on Created date.
The checkbox should be checked for the record if created date is the oldest among the list of records.
Couldn't you just manually check the checkbox on the object's record once you find out which one is the oldest record? You can find the oldest record from reports.
Again, if this is a case of deleting records then yes, autmation is needed. And below is a design I can offer to you Roy.
Steps:
1. Create a checkbox field named "Oldest Record" on an Object. (You may already have this)
2. Manually check the checkbox on the record which is oldest based on a created date.
3. You will need a trigger which fires on delete operation only. After Delete, After UnDelete. See my comments on trigger to build out a code.
Hope this helps!