ERPNext Notification "days before" and "days after" troubleshooting

ERPNext Notification "days before" and "days after" troubleshooting. Few steps and methods to troubleshoot Frappe notificaitons.

 · 1 min read


It is common ERPNext users struggling to troubleshoot notifications, specially " Days Before" , and "Days After"

The reason is they have to wait untill next day to execute the notification.


Here are the steps you can actually troubleshoot without waiting.

1-Basic


As shown in this picture, make sure you have an alert today.

Like , adjust the posting date of an invoice to yesterday's or day-before-yesterdays date, and enter 1 or 2 days accordingly on "days before or After" filed.


You should get a message like this




Make sure that scheduler running every days. Filter it with "notification.trigger_daily_alerts" as shown in the screenshot below. These must an execution log in every day. Otherwise there is an issue with scheduler.



If everything ok with scheduler, continue with following steps.


After that, you can use following command on bench ,


bench --site yoursite.erpgulf.com execute frappe.email.doctype.notification.notification.trigger_daily_alerts


It will execute the notification procedure immediately, that is supposed to be executed midnight today or tomorrow.


If executed correctly it will return blank. You can check on email queue or SMS/Whatsapp Log whether it is queued there on sent.


If it didnt executed properly , it will throw an error.


Send it to support@ERPGulf.com , we can help you to troubleshoot further.


If you want little bit more troubleshooting and you have some basic programming skills, put debug ( basically print("whatever") on the following file


apps/frappe/frappe/email/doctype/notification/notification.py


We have put a sample debug file here . https://github.com/ERPGulf/support/blob/main/notification.py


Team ERPGulf

The team behind ERPGulf blogs here, expresses their thoughts, shares the experience, often show the frustrations. Contact us on support@ERPGulf.com

1 comment
Aghiles August 14, 2024

i followed your tutorial, it's working fine with the "System Notification" type and i'm receiving the notification on the Notification Log doctype. But whenever i try to create a notification with type "Email", when i execute the bench command, i see this error (note that the message and the receiptients are the same with the last test)

ERROR Property: Invalid value for "CSS Level 2.1" property: var(--bg-color) [3:3: background-color] ERROR Property: Invalid value for "CSS Backgrounds and Borders Module Level 3" property: 1px solid var(--border-color) [4:3: border] ERROR Property: Invalid value for "CSS Backgrounds and Borders Module Level 3" property: 1px solid var(--border-color) [9:3: border] WARNING Property: Unknown Property name. [12:3: overflow-wrap] ERROR Property: Invalid value for "CSS Level 2.1" property: var(--border-color) [24:3: color] ERROR Property: Invalid value for "CSS Backgrounds and Borders Module Level 3" property: 1px solid var(--border-color) [25:3: border]

Add Comment