cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Individual alert in SAP B1

jakub1090cn
Newcomer
0 Kudos
244

Hi,

I would like to assign an alert to several users, but the alert should only be received by the user associated with the document.

I use user query:

SELECT 'In' + CAST(DATEDIFF(DAY, CAST(GETDATE() AS DATE),CAST(T1.[CLOSE] AS DATE)) AS nvarchar(MAX)) +' days the task '+ UPPER(CAST(T1.DSCRIPTION AS nvarchar(MAX))) + ' deadline is approaching in project' + UPPER(CAST(T0.Name AS NVARCHAR(MAX)))
FROM
OPMG T0 join PMG1 T1 on T1.AbsEntry = T0.AbsEntry
WHERE CAST(T1.[CLOSE] AS DATE) <= CAST(DATEADD(DAY, 6, GETDATE()) AS DATE) AND CAST(T1.[CLOSE] AS DATE) > CAST(GETDATE() AS DATE)
AND T1.FINISH <> 'Y'
AND T1.U_alert = 'Y'
AND (select UserId FROM OHEM WHERE empID = T1.[OWNER]) = $[USER]

The problem is the syntax $[USER] is not working in alerts.

Do you know how to solve this problem?

 

Accepted Solutions (0)

Answers (0)