Body of the Received email need to be update in comments/worknotes of the record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
HI Community,
I have a requirement, in HR Case record whenever we receive an email reply from user then it needs to update in the comments/worknotes .
I have written a inbound action script for it but it is not working as expected.
email get added to the activity log of the record but the email body is not getting updated in the comments/worknotes.
For example: email received is updated but the body of the email is not getting updated in record's comments/worknotes.
what am i missing
Part of the script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
did you debug and see what came in logs?
if the IF condition is not getting satisfied it won't update
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
HI @Ankur Bawiskar ,
HI @Ankur Bawiskar ,
Let me check that.
But can you please let me know that mailaddress is not declare anywhere above is it fine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
it might break as that variable is not defined.
what do you expect that variable to hold?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
HI @Ankur Bawiskar ,
Added the logs in script and tested it.
Email is processed and mail display in targeted record but comment/worknotes did not updated in targeted record.
And when i checked the logs
"Update HR Case : did not create or update sn_hr_core_case using current" this is what the information i get and this warning
i also get multiple information "slow ACL sysid for the path record/sn_hr_core_case/read , time was: 13"
and these messages did not present in logs gs.info('inside update for work notes'); or gs.info('inside update for comments');
i have access to read/write in the hr record but not sure why it is not working