Script Action Based on Newer Related Records
I trigger my checkin script with a button on the portal line. The portal shows by in/out transactions. The script simply sets the check in date on that transaction and resets a master record flag as "available".
Sometimes there are multiple related/transaction records with empty check in dates and I'd like to halt my script IF there is a newer / more current related record already in the system.
How can I check for the condition of "newer related records" before continuing the script?