I have a table of customers and a related table of purchases. Each customer has many purchases. I have a portal on the customer record sorted by date showing all their purchases, but I would like to have a field in the customer table I can search by that shows the date of their very first purchase.
The only way I know how to do this is with a script that runs in the customer layout OnRecordLoad, that grabs the date in the first portal row and puts it in the date field on the customer record. But this script only runs and populates the date field on the customer record when each record is opened in the layout. Is there a way to do this as a calculation field? Many thanks.