Skip to Content
0
Former Member
Feb 28, 2009 at 02:09 PM

Help for Alert required

19 Views

Hi,

I am trying to create an alert system in SAP Business One wherein once a users put the AR Invoice an automatic alert goes to the sales employee linked to that particular AR invoice.

The query for the alert is as under :

SELECT T0.DocNum, T0.DocDate,T0.CardCode, T0.CardName, T0.OwnerCode, T0.SlpCode,T1.lastName' 'T1.firstName as Creater

FROM OINV T0 INNER JOIN OHEM T1 ON T0.OwnerCode = T1.empID

WHERE T0.SlpCode = 1 and Datediff(yy,T0.DocDate,getdate()) = 0

Now the problem is that this alert seems to work fine but it is giving the sales Employee all the AR invoices which are made from Jan 2009 till date.

My requirement is that in the alert pop up message box it should only show the current and latest AR invoices and not from Jan 2009. Also in the alert pop up screen of sales employee how to remove the AR invoices which the sales employee has seen from the alert.

In the alert setup I have selected Alert frequency as every 1 minute and unticked Save History. My requirement is that as soon as the user enters the AR invoices at that time itself alert should go to the sales employee.

IS my query wrong please suggest or what have i done wrong.

Regards,

Kamlesh