To identify the last updated entry in the custom object | Community
Skip to main content
New Participant
June 9, 2023
Solved

To identify the last updated entry in the custom object

  • June 9, 2023
  • 1 reply
  • 1061 views

Hi Team,

Good day ! Is there a possibility to create a field which updates "last updated entry" with a Boolean value "True/False"

 

For example, if there is a field with current entry value and I require to know when was the last update entry made with a True/False Boolean value. Would we able to retrieve that information internally through a flag?

Regards,

Vishal

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Darshil_Shah1

Your question isn't clear, but you don't need a custom boolean field to identify whether the CO record was last updated or not as you can get that info from the updatedAt timestamp itself. Just sort the custom object records based on the updatedAt datetime field in descending order, and the record at the 0th index would be the one that was most recently updated.

#set( $sortedList = $sorter.sort($customObjList,"updatedAt:desc") ) The most recently updated is ${sortedList[0]}

Let us know if this is helpful or if you were looking for something else.

 

1 reply

Darshil_Shah1
Darshil_Shah1Accepted solution
Community Manager
June 9, 2023

Your question isn't clear, but you don't need a custom boolean field to identify whether the CO record was last updated or not as you can get that info from the updatedAt timestamp itself. Just sort the custom object records based on the updatedAt datetime field in descending order, and the record at the 0th index would be the one that was most recently updated.

#set( $sortedList = $sorter.sort($customObjList,"updatedAt:desc") ) The most recently updated is ${sortedList[0]}

Let us know if this is helpful or if you were looking for something else.