- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 06:07 PM
Can we display the "catalog item name" in the subject line of approval email notification.
Ex: The subject line sent to an approver should be " Requested Item RITMXXXXXXX Approval Request for Catalog_item_name". Can someone help me.
Thanks,
Bargavi
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 08:02 PM
Hello,
Go to the email template that is written for the approval email --> The Subject Line should be (in the template) Requested Item ${sysapproval} Approval Request for ${sysapproval.item.name}
Anything ${sysapproval} actually refers to the sys_id of the record of the task for which the approval is going to. So you can achieve many things with dot walking like I did. Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 08:44 PM
Hi Prasun,
Thanks for replying. Unfortunately, the solution did not work. The notification being triggered is Approval Request and the template used is change.itil.approve.role, I updated the subject of change.itil.approve.role but it is not working.
It still shows like below.
Thanks,
Bargavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 11:42 PM
Try this.
Requested Item ${sysapproval} Approval Request for ${sysapproval.cat_item.name}
Item is the display value, cat_item is the name of the field. I think it should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2016 01:26 PM
Hi Prasun,
I have issues with request.general e-mail template.
1. It doesnot add the catalog name to the subject line with ${sysapproval.cat_item.name} and
2. I have change.itil.approve.role template with a mailscript to include all the variables in the catalog item. the same mail script does not work with request.general template. Do I have to modify anything in below script so that it works even for request.general
var question = GlideappAbstractChoiceListQuestion.getQuestion(varown.sc_item_option.item_option_new);
template.print("Summary of Requested item:\n");
var scReqItem = new GlideRecord("sc_req_item");
scReqItem.addQuery("sys_id", current.sysapproval.toString());
scReqItem.query();
while (scReqItem.next()) {
gs.print(scReqItem.number + ": " + scReqItem.quantity + " X" + scReqItem.cat_item.getDisplayValue() + "\n");
gs.print(" Options:\n");
var varown = new GlideRecord('sc_item_option_mtom');
varown.addQuery("request_item", current.sysapproval.toString());
varown.orderBy("sc_item_option.order");
varown.query();
while (varown.next()) {
var visible = varown.sc_item_option.item_option_new.visible_summary;
//var question = Packages.com.glideapp.questionset.Question.getQuestion(varown.sc_item_option.item_option_new);//Packages
call replaced with line below on CAlgary+
var question = GlideappAbstractChoiceListQuestion.getQuestion(varown.sc_item_option.item_option_new);
question.setValue(varown.sc_item_option.value);
if (question.getLabel() != "" && question.getDisplayValue()!= "" && visible == true) {
template.space(4);
template.print(' ' + question.getLabel() + " = " +
question.getDisplayValue() + "\n");
}}}
Thanks,
Bargavi.