I have a Opportunity object which has a few objects like Job Documents. For example: I have Opportnity A which has a 3 JOB DOCUMENTS.
I need to build a report based on Opportunity with JOB DOCUMENTS but in report I would like to have only the newest JOB DOCUMENT. I do not want to all JOB DOCUMENTS but only one - newest.
I think that I can create a checkbox and write a trigger (after update) which will mark this checkbox on true when one of those 3 records have been modified. Of course if I have 3 JD (A,B,C) when JD A has been modified checkbox on JD A will be true but on the rest B and C will be false.
This is a good idea or maybe I can achieve this in other way ? Formula or flow ?