<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>after_action_new[ Search for &quot;&quot;]</title>
        <description></description>
        <link>http://xataface.com/wiki/index.php?-action=single_record_search&amp;-table=wiki&amp;page_id=%3D33&amp;-cursor=0&amp;-skip=0&amp;-limit=30&amp;-mode=list&amp;--subsearch=</link>
        <lastBuildDate>Fri, 24 May 2013 05:17:24 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>after_action_new</title>
            <link>http://www.xataface.com/wiki/after_action_new</link>
            <description>&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page name&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;after_action_new&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page id&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page title&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;after_action_new&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Content&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;
&lt;h2 id=&quot;toc0&quot;&gt;after_action_new trigger&lt;/h2&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;
&lt;div id=&quot;toc&quot;&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;
	&lt;div style=&quot;margin-left: 0em;&quot;&gt;&lt;a href=&quot;#toc0&quot;&gt;after_action_new trigger&lt;/a&gt;&lt;/div&gt;
	&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#toc1&quot;&gt;Signature&lt;/a&gt;&lt;/div&gt;
	&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#toc2&quot;&gt;Parameters&lt;/a&gt;&lt;/div&gt;
	&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#toc3&quot;&gt;Examples&lt;/a&gt;&lt;/div&gt;
	&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#toc4&quot;&gt;Example 1: Redirect to the view tab for the inserted record&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;This trigger is called after the &lt;strong&gt;new&lt;/strong&gt; action is successfully completed.  This trigger can be defined in the table &lt;a href=&quot;/wiki/Delegate_class_methods&quot;&gt;delegate class&lt;/a&gt; and is often used to redirect to a particular page after a new record is submitted.  This should not be confused with the afterInsert&lt;a href=&quot;/wiki/index.php?-action=new&amp;-table=wiki&amp;page_name=afterInsert&quot;&gt;?&lt;/a&gt; trigger, which is executed after a record is inserted into the database (this can occur multiple times per request).  The after_action_new trigger is only executed once after the 'new' action has been successfully completed.  i.e. a maximum of once per request.&lt;/p&gt;


&lt;h3 id=&quot;toc1&quot;&gt;Signature&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;function after_action_new($params=array()){ ... } : return void&lt;/code&gt;&lt;/pre&gt;


&lt;h4 id=&quot;toc2&quot;&gt;Parameters&lt;/h4&gt;
&lt;p&gt;This method takes a single associative array as a parameter. This array includes the following keys:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt; &lt;strong&gt;record&lt;/strong&gt; - The &lt;a href=&quot;http://dataface.weblite.ca/Dataface_Record&quot; onclick=&quot;window.open(this.href, '_blank'); return false;&quot;&gt;Dataface_Record&lt;/a&gt; object that was just inserted.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3 id=&quot;toc3&quot;&gt;Examples&lt;/h3&gt;

&lt;h4 id=&quot;toc4&quot;&gt;Example 1: Redirect to the view tab for the inserted record&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;function after_action_new($params=array()){
    $record =&amp;amp; $params['record'];
    header('Location: '.$record-&amp;gt;getURL('-action=view').'&amp;amp;--msg='.urlencode('Record successfully inserted.'));
    exit;
}&lt;/code&gt;&lt;/pre&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Language&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;en&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description>
            <author>after_action_new</author>
        </item>
    </channel>
</rss>
