Requested Item Comment - comment.user displays as 'undefined'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 06:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 06:41 AM
Hello @athavichith
Can you paste code or script logic used to showcase this over your notification?
Is this happening for specific user or for all user? Did you tried to test notification being used by passing another example.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 07:36 AM
this is on the 'comment_left_request' notification script. Here is the script:
This does happen for every users. Tried replacing comment.user to gs.getUser().getDisplayName() but it retrieved the display name of the 'System Admin' when tested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 08:37 AM - edited 02-17-2025 08:49 AM
Hi @athavichith ,
If your notification script is in another scope, Try to add global prefix for script include as below
var notificationUtil = new global.RequestNotificationUtil();
I have created a fix script and try to call the RequestNotificationUtil() from scoped application and it returns the "undefined" in the error. Also, nothing was displayed on the log.
Now when I tried to add global qualifier, I got below output. along with info message as below
NOTE: Impersonated Abel Tuter for adding comments. And it shows abel's name correctly in the log.
Please mark my answer as correct/helpful if this solves your question.
Best Regards,
Pooja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 10:19 PM
Hi @athavichith ,
Did you get a chance to check the above solution?
If it solves your query, Kindly mark as helpful!
Best Regards,
Pooja