I need to send notification to user on user anniversary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 03:36 AM
Hi @Ankur Bawiskar,
I'm executing my schedule job now and I'm able to see that in email logs it is sending email notification for user whom hire date is on 17th March ideally it should send notification to user whom hire date is on today 16th March but it is taking that user whom hire date is on tomorrow that is 17 March and sending notification to that user. I need to send notification to user when their anniversary date is completed and we are calculating anniversary date based on hire date and it should send notification user whom hire date is on today.
It should calculate user anniversary for user whom hire date is on today that is 16th March but is calculating user anniversary whom hire date is on tomorrow that ids 17th March.
I need to calcualte anniversary date on exact hire date.
I have written script :
Schedule job
Please help me to correct that So that it will send notification to user whom hire date is on today only.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 12:55 AM
Hi @Medi C,
Can you please tell how to get hire date correctly.
Can we do +1 in that.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 01:35 AM
Hi @niveditakumari,
please try to_date.getDisplayValue() on your gs.log
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 03:16 AM
HI @Medi C,
I have added code which you have mention above to get today date.
I don't know which time it is taking in today date time.
Please see below screenshot :
I have added schedule job time zone as 'Asia/Riyadh' because of that it is showing created as their today date time that is showing correctly but not sure about today date is printing which date. It seems that is an issue it is taking some other time.
My profile time zone is same as 'Asia/Riyadh'.
Can you please make me understand and correct that.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 04:03 AM
Hi @Medi C,
I got one root cause for that.
Please find attached screenshot :
Here for above user in table('sys_user') it is showing hiring date is 17th March but in logs it is showing 16th March.
One more thing when that schedule job is executing as per scheudle time then it is working as expected but when we are executing that manually then it is not working. It is sending notification based on user whom hiring date is on tomorrow.
Can you please help me correct that why it is happening.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:35 AM
Hi @Ankur Bawiskar,
Can you please help me with above.
When I'm executing above code it is printing hire date wrong.
Please find attached screenshot :
For above user hiring date is 17th in table('sys_user') but in log it is showing 16th because my script is not working.