- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 07:03 AM
I'm currently creating a mail script to query a Task's related records and display those related record's fields in a determined format.
Querying the records I need is no problem, however, how would I go about getting each related record object and parsing the fields to string values to display in a mail script?
I've used the JSON.parse() method before in record producer's however that was for a variable and not a record object.
I'll provide a screenshot for reference.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 09:51 PM
Hi Thomas,
so you can print them in email using
template.print(gr.source_ip);
what issue you are facing?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 08:36 PM
Glad that it worked.
Could you also mark answer as helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2021 12:01 AM
if I just want to print the value of the choice field how to do it?
I have used this and it is showing the label
template.print(current.getValue(u_contry));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2021 12:11 AM
Hi,
this would give you the choice value
template.print(current.getValue('u_contry'));
this would give you the choice label
template.print(current.u_contry.getDisplayValue());
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2021 12:19 AM
template.print(current.getValue('u_contry'));
I am getting null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2021 12:27 AM
Hi,
please post a new question and tag me.
This is an old thread so difficult to track
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
