Thursday, 25 April 2019

Email notification with all the variable of Catalog Item


Notifications keep users informed of events that concern them. The system can notify users by email, SMS text message, or push notification.
Creating an email notification involves specifying when to send it, who receives it, what it contains, and if it can be delivered in an email digest.


Requested For: ${sysapproval.request.requested_for}
Cost Center to be charged: ${sysapproval.request.requested_for.cost_center}

  var item = new GlideRecord("sc_req_item");
  item.addQuery("sys_id", current.sysapproval);
  if( {

      var keys = new Array();
      var set = new GlideappVariablePoolQuestionSet();
      var vs = set.getFlatQuestions();

      for (var i=0; i < vs.size(); i++) {
        if(vs.get(i).getLabel() == 'Website Cost (per year)') {
               template.print("Yearly cost for this website is " + vs.get(i).getDisplayValue() + ".\n");

    template.print("\nSummary of Requested item:\n\n");

     var set2 = new GlideappVariablePoolQuestionSet();
      var vs2 = set2.getFlatQuestions();

for (var x=0; x < vs2.size(); x++) {
    if(vs2.get(x).getLabel() != '') {
        if ( vs2.get(x).getDisplayValue() != "") {
            template.print('     ' +  vs2.get(x).getLabel() + " = " + vs2.get(x).getDisplayValue() + "\n");

Approval Activity:
<hr />
Click here to view Approval Request: ${URI}
Click here to view ${sysapproval.sys_class_name}:  ${sysapproval.URI}

No comments:

Post a comment