cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One: Can Alert be triggered only once

0 Kudos

Experts,

I need to create alerts that are triggered once a day, but then not the next day. So if I set the Alert to Daily at 8am and the query still bring the same result the next day, I need it to not alert.

Is there a way to set that in the Alert?

How would I add that to the query: If the thing that triggers the query to have results have the same as current date?

Regards,

Marli Schutte

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor

Hi Marli,

That's right, the only way to accomplish this is to bake a date check into your query. Please note that (assuming you are running on MS SQL) the GETDATE() function will also return a time component. That means that:

DocDate = GETDATE()

will not work, because DocDate is (for example) 14.08.2020 00:00:00 and GETDATE() returns 14.8.2020 8:39:45.

To circumvent this problem, you can do this:

DocDate = cast(floor(cast(GETDATE() as float)) as datetime)

I am not sure what the syntax is for HANA.

Regards,

Johan

Answers (0)