Home Cireson Uploads

IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.


All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.

Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.

Dont forget to checkout solutions uploaded by our customers, partners and community members here.

Simple Print View

Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
edited June 2018 in Cireson Uploads


This will generate a simple print view of a given work item in the Cireson Portal for Service Manager. It will list all properties that have values in a single grid. It will also show the Action Log, Reviewers(if the Work Item is a Review Activity),and the Work Item History.


After the success of my Powershell version of Export to HTML, I decided to give a portal task a try.  Please be aware that I'm no javascript expert and this is very hacked together, but it does seem to work fairly well at least in my lab.  I welcome all feedback, requests, and contributions! ;)


  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Awesome work @Justin_Workman !
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    You are on a roll, @Justin_Workman.  This is another really useful tool!
  • Joe_BurrowsJoe_Burrows Cireson Devops Super IT Monkey ✭✭✭✭✭
    +1  - very nice Justin - use to get asked for better print a lot!
  • Mikkel_MadsenMikkel_Madsen Customer Advanced IT Monkey ✭✭✭
    Great feature  :smile:

    A feature request to this is implementing it for KB articles too :wink: 
  • Steve_WrightSteve_Wright Cireson Support Advanced IT Monkey ✭✭✭
    +1 - Nice work!
  • Jeremy_WhalenJeremy_Whalen Customer IT Monkey ✭

    I just installed this but am unclear on how exactly to history. Is this modified in the custom.js? 
    Per the GitHub page:
    showHistory - Set this to false to disable the History. URL Example:/view/printView?workItemType=Incident&workItemId=IR123&showHistory=false
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Jeremy_Whalen - History should come up by default.  If you want to exclude history, you can change the task registration in custom.js.  So where you have something like:
    app.custom.formTasks.add('Incident', "Simple Print", function (formObj, viewModel) { 
       window.open('/view/printView?workItemType=Incident&workItemId=' + viewModel.Id, '_blank');

    you would change:
    window.open('/view/printView?workItemType=Incident&workItemId=' + viewModel.Id, '_blank');
    to :
     window.open('/view/printView?workItemType=Incident&workItemId=' + viewModel.Id + "&showHistory=false", '_blank');

    Then every incident will open with the history turned off.  I hope this helps!
  • Jeremy_WhalenJeremy_Whalen Customer IT Monkey ✭
    Thanks @Justin_Workman despite my nonsensical question your provided the exact insight I needed!
  • Jeremy_WhalenJeremy_Whalen Customer IT Monkey ✭
    @Justin_Workman and another question. We have five review activities one after another. The first three open in a single tab, one after another, the last two do not open at all. Any ideas on what might cause this?

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Justin_Workman and another question. We have five review activities one after another. The first three open in a single tab, one after another, the last two do not open at all. Any ideas on what might cause this?

    I have seen this too.  I'm not sure of the cause.  I'll have a look and see if I can figure it out.
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Jeremy_Whalen - Do you have your pop up blocker disabled for your portal site?  My popup blocker was catching all but one of my activities.  When I did an explicit rule to allow my portal site, they all came through.
  • Jeremy_WhalenJeremy_Whalen Customer IT Monkey ✭
    edited February 2019
    @Justin_Workman Pop up blocker is off. When I run the "Simple Print Activities" task in Chrome or IE I get multiple new tabs created. Review activities open in the same tab (except two that never open), one after another so I have to use the back button to go the prior RA steps for printing. Each MA opens in its own tab.

    In Firefox when pop ups are allowed it will only open one RA but all MA and RB. When popups are blocked it opens only first activity (an MA) and prompts me that 10 more tabs are trying to open. When I allow pop ups ALL of the remaining activities open in their own tabs. It's almost like the pause is somehow important. Any thoughts on why the RA are trying to open in the same tab in IE and Chrome?

    Here are the activity types in order.
    01 MA 
    02 RB 
    03 RA (has loaded sporadically)
    04 RA 
    05 MA 
    06 RA (has never loaded except in FF and then only after allowing all popups)
    07 RA 
    08 MA 
    09 RA 
    10 MA 
    11 RA

    I hope that makes some sort of sense to you. If not we might need to talk so I can explain it better.
  • Craig_SmithCraig_Smith Customer IT Monkey ✭
    This work around seems cobbled together :)
  • H_GerlingH_Gerling Member Adept IT Monkey ✭✭

    Hi @Justin_Workman, is it possible to get the description field with a better Format? with Line Breakes and so on?

    Customer of mine have Trouble to use this function with descriptions created via E-Mail or with more Lines, since there is no linebreak at the Output :/

  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭

    I've created an alternate version to the one Justin created, at https://community.cireson.com/discussion/5726/single-print-work-items/ . It skips a few items but puts everything on one HTML page for printing.

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Looks good @joivan_hedrick

Sign In or Register to comment.