<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Set_Request%2FIncident%2FProblem_Status_on_Dispatch_Change</id>
		<title>Set Request/Incident/Problem Status on Dispatch Change - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Set_Request%2FIncident%2FProblem_Status_on_Dispatch_Change"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Set_Request/Incident/Problem_Status_on_Dispatch_Change&amp;action=history"/>
		<updated>2026-04-17T14:09:22Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Set_Request/Incident/Problem_Status_on_Dispatch_Change&amp;diff=3573&amp;oldid=prev</id>
		<title>Gityerfix: New page: __NOTOC__ Category:Change Orders Category:Customizations Category:Incidents Category:r6 Category:r11 Category:Problems Category:Requests [[Category:Schema Chang...</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Set_Request/Incident/Problem_Status_on_Dispatch_Change&amp;diff=3573&amp;oldid=prev"/>
				<updated>2008-12-06T16:19:14Z</updated>
		
		<summary type="html">&lt;p&gt;New page: __NOTOC__ &lt;a href=&quot;/wiki/index.php?title=Category:Change_Orders&quot; title=&quot;Category:Change Orders&quot;&gt;Category:Change Orders&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:Customizations&quot; title=&quot;Category:Customizations&quot;&gt;Category:Customizations&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:Incidents&quot; title=&quot;Category:Incidents&quot;&gt;Category:Incidents&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:R6&quot; title=&quot;Category:R6&quot;&gt;Category:r6&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:R11&quot; title=&quot;Category:R11&quot;&gt;Category:r11&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:Problems&quot; title=&quot;Category:Problems&quot;&gt;Category:Problems&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:Requests&quot; title=&quot;Category:Requests&quot;&gt;Category:Requests&lt;/a&gt; [[Category:Schema Chang...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Change Orders]]&lt;br /&gt;
[[Category:Customizations]]&lt;br /&gt;
[[Category:Incidents]]&lt;br /&gt;
[[Category:r6]]&lt;br /&gt;
[[Category:r11]]&lt;br /&gt;
[[Category:Problems]]&lt;br /&gt;
[[Category:Requests]]&lt;br /&gt;
[[Category:Schema Changes]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This article provides instructions for setting the Status of a Request, Incident, or Problem when initiating a '''Dispatch Change''' Activity.&lt;br /&gt;
&lt;br /&gt;
== Procedures ==&lt;br /&gt;
=== Step 1. Create the script ===&lt;br /&gt;
{{Create Spell Script}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;alg::zsetstat(...) {&lt;br /&gt;
    string z_stat;&lt;br /&gt;
&lt;br /&gt;
    // Put the code of the desired status below&lt;br /&gt;
    z_stat = &amp;quot;CODE&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    send_wait(0, this, &amp;quot;call_attr&amp;quot;, &amp;quot;call_req_id.status&amp;quot;, &amp;quot;set_val&amp;quot;, z_stat, &amp;quot;SURE_SET&amp;quot;);&lt;br /&gt;
    if (msg_error()) {&lt;br /&gt;
        logf(ERROR, &amp;quot;error setting status to %s on %s %s - %s&amp;quot;, z_stat, call_req_id.type.sym, call_req_id.ref_num, msg[0]);&lt;br /&gt;
    } else {&lt;br /&gt;
        logf(SIGNIFICANT, &amp;quot;successfully set status to %s on %s %s&amp;quot;, z_stat, call_req_id.type.sym, call_req_id.ref_num);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2. Create the trigger ===&lt;br /&gt;
This step is to create the trigger that will initiate the script. The methods used to implement the trigger vary based on the Service Desk release. &lt;br /&gt;
&lt;br /&gt;
''For r11.x releases'' triggers are created via the [[Schema Designer]] utility. Simply add the following code as a [[Site-Defined Trigger]] to the '''[[Act Log Table|alg (Activity Log)]]''' table.&lt;br /&gt;
 POST_VALIDATE zsetstat() 113 FILTER(type == 'CHG');&lt;br /&gt;
&lt;br /&gt;
''For older releases'' triggers are made by creating a [[.mod file]] and placing it in the [[$NX_ROOT]]/site/mods/majic directory. Name the [[.mod file|.mod]] anything you like, but it is recommended that it be preceded with a 'z'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;OBJECT alg {&lt;br /&gt;
  TRIGGERS {&lt;br /&gt;
    POST_VALIDATE zsetstat() 113 FILTER(type == 'CHG');&lt;br /&gt;
  };&lt;br /&gt;
};&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3. Publish the Schema changes ===&lt;br /&gt;
{{Publish Schema Change}}&lt;/div&gt;</summary>
		<author><name>Gityerfix</name></author>	</entry>

	</feed>