I have a requirement to fetch Timecard records that are related to a Project.
Below is my query:
List <Timecard__c> timecard = [
SELECT ID,Project__c,resource_name__c
FROM Timecard__c
Where Project__c != null];
The issue here is that, for each project, there are multiple timecards logged by a resource. Eg: Resource A has 100 Timecard records under a Project.
Now, is there anyway that i can fetch only one Timecard record related to a resource for a project? This timecard record can be any random record per resource.
Please suggest.