Hello everyone,
I have a dataverse table in Tenant A - Environment X called AllowedRecords that has simply the below record:
In Tenant B - Environment N, I have a custom table.
What I want to achieve is the below:
- Every time a user in tenant B tries to add a record, an API call should be executed that will check in Tenant A environment X table allowedrecords if he's still allowed to add records to the table.
- If the API call, as a result, returned the number of rows that are allowed to be created comparing it to the total count of records in table B and he didn't exceeded the number, it will allow him to save the record, if not, it should throw an error message to the user saying that "The number of records for that table has been exceeded".
The purpose of the above is to control the number of records that should be created in table B based on a pre-validation from a table on a completely different tenant and environment.
Could you please provide some helpful resources or a sample to achieve the above requirements?
Any help is highly appreciated.
Best regards,
EBMRay