Hi, i have created a power app with a 1:N relationship between Account and Contracts. The Account can have many contracts, but i want to restrict so there only can be one contract 'active' at a time. Iv'e search around but haven't had the luck of others asking about the same scenario.
As you mentioned, Contracts have many and there is no easy way to restrict them. The solution is to create a plugin (c#) and register them in the pre-validation Stage with Sync using XrmToolboxor Plugin Registration tool.
Pre-validation is the first stage that executes before the main system operation and outside the database transaction.
Your plugin logic whether any existing active contracts exist before you save. If exists stop saving the record.