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
Aravind RajamanickamAravind Rajamanickam 

Rollup summary to filter only 1 recently created record

Hi

Is it possible to filter child records to only the one which is added recently (based on created date).. i have a requirement to get the rullup summary for only the recently added child object field value.

i know we can do via apex. just wanted to check if there is any option with config

thanks
Best Answer chosen by Aravind Rajamanickam
Shri RajShri Raj
In the SOQL query before inserting we can update the Parent object.

All Answers

Shri RajShri Raj
MAX(CreatedDate) would give you the Date of the record which was recently created
Aravind RajamanickamAravind Rajamanickam
Thanks for the response but that wont work i guess

for example

Account A - has 10 Custom object records as child record.

the summary of a numeric field should consider only one record (which is created recently)

MAX(CreatedDate - will give me the date and i need a different numeric field value
Shri RajShri Raj
Ohh in that case we can have it though a trigger. 
Shri RajShri Raj
In the SOQL query before inserting we can update the Parent object.
This was selected as the best answer