fields not pulling in data in notification emails

scottjus82
Kilo Guru

Hi,

 

I am ammending our approval request notification email to include start and end dates of the change as well as the business service. the first three are puling in the data in the fields but the rest do not, they just display the field name but no data. I have tried referencing these fields from different tables but always the same results.

 

Approval for: ${sysapproval}Short Description: ${sysapproval.short_description}

Priority: ${sysapproval.priority}

Category: ${sysapproval.category}

 

Business Service: ${u_category_level_1}

Planned end date: ${end_date}

Planned start date: ${start_date}

 

Any thoughts?

11 REPLIES 11

<mail_script>


if(sysapproval.sys_class_name == 'change_request'){


  var changeRequest = new GlideRecord('change_request');


  changeRequest.get(sysapproval.sys_id);


  template.print(changeRequest.start_date);


  template.print(changeRequest.end_date);


}


</mail_script>



I haven't tested it though. You may have to make some modifications.


JP51
Tera Contributor

  var changeRequest = new GlideRecord('change_request');


  changeRequest.get(current.sysapproval);


  template.print(changeRequest.start_date);


  template.print(changeRequest.end_date);