- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Team,
I have implemented a inbound email action to create an incident. However all the fields are populating as expected according to the mapping in action script. I have mapped email body to description of the target record but it is not populating. I have used the script as below:
current.description = email.body;
Could you please suggest if we have any other approach to map correctly?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @PrasadK43791691 ,
This method should help to populate the description..
Although verify which email field actually contains the content:
gs.info('Email Body: ' + email.body);
gs.info('Email Body Text: ' + email.body_text);
gs.info('Email Body HTML: ' + email.body_html);
current.description = email.body;
Once you identify the populated field, map that value to current.description.
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Ankur Bawiskar ,
As @yashkamde suggested, I have tried adding the logs to find out what type of body is populating. In my instance body is populating as body_html
current.description = email.body_html;I have used above line in my script and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@PrasadK43791691 Glad to know your issue is resolved !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it should work fine
Did you try adding email body in work notes etc?
current.comments = email.body_html;
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
code should be
current.description = email.body_text;
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
