Hi @PowerBack19
Thank you very much for your reply and insights!
If I may pick your brain a little further since there are added complexities to my original requirement.
So, what I have now is the followings (at a high level):
- In Dynamics 365, I have a custom entity called "Validation Rule" where each record represents a rule. Each rule is for a specific field, and for a specific code, from the Account entity.
- Whenever the account record is updated, I want to trigger the Power Automate and apply the validation rule, referencing the Validation Rule entity.
- My challenge is: how can I define the steps/actions in the Power Automate so that it understands which Validation Rule record to use for the comparison. For example, the account that's updated could be of code "A", "B", or "C", and the I need to run the validation on field "a", "b", and "c" on the account. Under the Validation Rule entity, I have the following list of records:
- Record 1: Field = a, Code = A, Min Value = 0, Max Value = 100
- Record 2: Field = a, Code = B, Min Value = 0, Max Value = 80
- Record 3: Field = a, Code = C, Min Value = 50, Max Value = 200
- Record 4: Field = b, Code = A, Min Value = 0, Max Value = 75
- Record 5: Field = b, Code = B, Min Value = 0, Max Value = 50
- etc.
So basically, what I am checking is if the account record is of Code = A, then I would need to apply the validation rules that are relevant for Code = A to check that the field values entered are between the min/max values range.
Any suggestions how I could best implement this. I am hoping for an approach where I could avoid to deal with any codes.
Any further pointers would be greatly appreciated!
Thank you!