Custom Record Field, one to many relationship, pick one

Certified Lead Developer

My situation is as follows:

I have a Vehicle record, an Employee record and a Driver mapping record between them. A vehicle can be reserved by a driver at a time, but in it's history there can be many previous drivers. I want to make a custom record field that shows the current driver assigned to a given vehicle so that i can use it throughout my application. However I am not sure how to do this with the aggregated custom fields. Since aggregations basically do not care for the specific thing i want (I want to show the employee name of the driver that has the latest start date on the mapping table).

Is there anything i can do for this? Or do i just have to rely on relationships and generally querying relatedRecordData appropriately to satisfy this situation? 

  Discussion posts and replies are publicly visible

Parents Reply Children