Difference between revisions of "Set Defaults on Manual Notify"

From SDU
Jump to: navigation, search
Line 1: Line 1:
I had a requirement for the assigned group and ticket customer to be defaulted in the recipients list for manual notifications in Service Desk. I know you can set them as object contacts for the Manual Notify activity notification - but that will not allow you to turn it off on the fly. For instance - 90% of Manual notifications go to the group or customer. Sometimes, I want to add more recipients or take group and/or customer away.
+
This article provides instructions on how to automatically set the recipients of a [[Manual Notification]] to [[Affected End User]] and [[Group]] and then have the ability to remove them.
  
I put the following mod on nf.htmpl
+
== Step 1. Edit the nf.htmpl form ==
 +
In the head of nf.htmpl, look for the following code:
 +
<source lang="javascript"> function initNames() {
 +
<PDM_IF $dob.notify_list.length == 0>
 +
// Cope with Netscape's lack of resizing:
 +
document.main_form.notify_list.options.length = 0;
 +
</PDM_IF></source>and place this code directly below it:
 +
<source lang="javascript">if (document.main_form.in_names.value == ''){
 +
document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name';
 +
document.main_form.in_ids.value = '$args.customer.id $args.group.id';
 +
}</source>
  
In the head section is a JS function called InitNames
+
For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.
  
At the beginning of that function is a <PDM_IF> block...just after that block, I use the following JS code:
 
  
CODE
+
== Step 2. Clear the web cache ==
if (document.main_form.in_names.value == ''){
+
The final step is to clear Service Desk's cache. The methods vary depending on release.
document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name';
+
document.main_form.in_ids.value = '$args.customer.id $args.group.id';
+
<font color="blue">For r11.x releases </font> publish your changes via the [[Web Screen Painter]]. The process of publishing automatically initiates a [[pdm_webcache]].
}
+
 
 +
<font color="blue">For older releases</font> execute [[pdm_webcache]] from a command prompt on the [[Primary Server]]. There is no need to run this command on the [[Secondary Server|Secondary Servers]].
 +
 
 +
 
 +
----
 +
<div align='center'><font color="red">To make corrections or additions to this article, select the ''edit'' tab above.<br>
 +
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>
  
 
[[Category:Customizations]]
 
[[Category:Customizations]]

Revision as of 20:12, 7 February 2008

This article provides instructions on how to automatically set the recipients of a Manual Notification to Affected End User and Group and then have the ability to remove them.

Step 1. Edit the nf.htmpl form

In the head of nf.htmpl, look for the following code: <source lang="javascript"> function initNames() { <PDM_IF $dob.notify_list.length == 0> // Cope with Netscape's lack of resizing: document.main_form.notify_list.options.length = 0; </PDM_IF></source>and place this code directly below it: <source lang="javascript">if (document.main_form.in_names.value == ){ document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name'; document.main_form.in_ids.value = '$args.customer.id $args.group.id'; }</source>

For r11.x releases it is recommended that you edit your pages via the Web Screen Painter. For older releases you must edit the files directly.


Step 2. Clear the web cache

The final step is to clear Service Desk's cache. The methods vary depending on release.

For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.

For older releases execute pdm_webcache from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.



To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.