The query is very simple, to get a list of today's AP invoices that had different TERMS than the AP Vendor Set up. The query returns records correctly as below:
SELECT dbo.APVEN.VENDNAME AS "VENDNAME", dbo.APIBH.AMTDUEHC AS "AMTDUEHC", dbo.APIBH.IDINVC AS "IDINVC", dbo.APIBH.IDVEND AS "IDVEND", dbo.APIBH.DATEINVC AS "DATEINVC", dbo.APIBH.TERMCODE AS "InvoiceTERMCODE", dbo.APIBH.TERMSDESC AS "InvoiceTERMSDESC", dbo.APVEN.TERMSCODE AS "VendorTERMSCODE" FROM (dbo.APIBH LEFT OUTER JOIN dbo.APVEN ON dbo.APIBH.IDVEND = dbo.APVEN.VENDORID) WHERE dbo.APIBH.DATEINVC >= {%Last Friday Date YYYYMMDD%}
AND dbo.APIBH.TERMCODE <> dbo.APVEN.TERMSCODE
ORDER BY dbo.APIBH.IDVEND ASC, dbo.APIBH.IDINVC ASC
But the application events never executes and get it send the email.
Where could be the issue to look at?
SELECT dbo.APVEN.VENDNAME AS "VENDNAME", dbo.APIBH.AMTDUEHC AS "AMTDUEHC", dbo.APIBH.IDINVC AS "IDINVC", dbo.APIBH.IDVEND AS "IDVEND", dbo.APIBH.DATEINVC AS "DATEINVC", dbo.APIBH.TERMCODE AS "InvoiceTERMCODE", dbo.APIBH.TERMSDESC AS "InvoiceTERMSDESC", dbo.APVEN.TERMSCODE AS "VendorTERMSCODE" FROM (dbo.APIBH LEFT OUTER JOIN dbo.APVEN ON dbo.APIBH.IDVEND = dbo.APVEN.VENDORID) WHERE dbo.APIBH.DATEINVC >= {%Last Friday Date YYYYMMDD%}
AND dbo.APIBH.TERMCODE <> dbo.APVEN.TERMSCODE
ORDER BY dbo.APIBH.IDVEND ASC, dbo.APIBH.IDINVC ASC
But the application events never executes and get it send the email.
Where could be the issue to look at?