I created an optimizer rule to check for duplicated BP reference numbers on A/P invoices.
This rule checks A/P invoice draft documents on BP reference numbers when you want to add a new A/P invoice.
It seems like the code is correct but it the function doesn't work.
As it is not possible to debug the SQL code I need to convert it to cSharp as I will be able to put some message boxes in.
As I am not familiar with cSharp is there anyone who would be able to convert my Optimer SQL code to cSharp so I can see what is missing in my rule. Below the code.