cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate ItemCode Alert On AR Invoice

Former Member
0 Kudos

Hi All,

I am looking for an alert that will find duplicate ItemCodes on a single invoice.

Once the invoice is posted it must alert a user that the specific invoice contains duplicate ItemCodes.

Any help will be appreciated.

Regards,

Quinn

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Quinn,

Try:

SELECT T0.DocNum, T0.CardCode,T1.ItemCode

FROM OINV T0 INNER JOIN INV1 T1 ON T1.DocEntry=T0.DocEntry

WHERE DateDiff(dd,T0.DocDate,GetDate()) = 0

GROUP BY T0.DocNum, T0.CardCode,T1.ItemCode

Having Count(T1.ItemCode) > 1

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

Thank you for your reply.

I have tested the query you have given me and it works 100%

Thanks.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi.......

Alert will generally fire after you add invoice which is not of use.

But if you want to restrict it completely then you may use SP Transaction Notification........

Regards,

Regards,

Rahul

Former Member
0 Kudos

Hi Rahul,

Thanks for the reply.

I have a SP already but they want me to take it off.

They want to let the Invoice go through and only be alerted to the event.

Regards,

Quinn