Reporting - Embedded Reports into Email Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2017 11:10 AM
I have a requirement to build an email notification report which will be sent out on a monthly basis by a scheduled job. In the notification amongst the HTML, the customer wants to embed reports rather than have them as attachments. Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2017 08:19 PM
Hi Mike,
Do you have any examples of these html / css templates that I could model? or are you able to point me in the direction of where I can get started?
The idea of being able to add a table in the email notification does sound good.
Cheers,
Brendan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2017 04:28 AM
Generally, I find a report that looks the way I want it out there in the wild, wild internet and look at it's source. Then I take some of the pieces and make it my own. I am no UX designer, so I generally don't care about what the data looks like. I am more concerned that the data is actionable and accurate. This is why, every time I have to build a page, I have to relearn CSS and HTML. That being said, I generally find a site like Top 24 Simple, Yet Beautiful CSS3 Table Templates And Examples - Colorlib and go from there.
The notification email script has a call template.print and it accepts strings with html in it, similar to this:
template.print("<div style='width: 100%; height: 700px'><iframe id='report_target' name='report_target' src='https://dev27082.service-now.com/sys_report_display.do?sysparm_report_id=82240486dfb0010068c37a0d3df...' width='100%' height='700px' scrolling='yes'></iframe></div>");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2017 04:32 AM
I would throw all CSS in one notification script and the html code in another. Another key piece to remember is that the script area of the record takes ~4000 characters, which html can fill up pretty quickly. Using one notification script per report would probably be the best method. Then, in the notification, just list the scripts one after another, starting with the CSS and ending with some footer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2017 04:34 AM
Also, when styling, use ServiceNow Design System as a helpful way to ensure your work looks like the ServiceNow style.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2017 10:06 PM
Hi Mike,
Thanks a lot for all this information.
Just a question, when you put the css into a notification script, does it need any javascript, or can I just start adding the css styling?
Cheers,
Brendan