I have a before insert flow which is not working correctly. The flow works as follows:
The flow should prevent the creation of a record from custom object AreaInteres__c if there is already a record created with the same values for two fields (Interes__c and Lead__c). This way a Lead shouldn't have a duplicate interest. I am going to attach a screenshot of the test that I prepared.
I also tried setting another condition in the decision element, the id of the record you obtained is not the same as $Record.Id, but as you can see in the interview the record has no Id. I guess the record returned is the one you are trying to create, as I have made the same query via inspector and no records are returned.
Thanks for your help.