We are building a simple model driven app to manage card keys. The app aims to keep track of who used the card key and when it was returned.
The tables we have are:
- CardKey
- Transaction
The user creates a Transaction record and in its look-up field he selects a Card key record and save the record. When the user returns the card key, he would select the return date time and save it. Now we want to prevent other users from using the same card key that someone else currently uses. If the user selects a card key that has already been in someone else's hand, at the time of pressing "save" icon I want to display a warning message so that the user knows he needs to select other card. I think I should implement some sort of validation logic before the record is saved in Dataverse to achieve the above case. Looking at the "Business Rule", I don't think it fits in this scenario. Does anyone have ideas for it?