<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.sageaccpac.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CRM</title><link>http://community.sageaccpac.com/forums/17.aspx</link><description>The core functionality comprising the SageCRM.COM and Sage CRM applications including Solo server.  </description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP1 (Build: 30415.43)</generator><item><title>Re: Update Table Script - Get Latest Data</title><link>http://community.sageaccpac.com/forums/thread/2093.aspx</link><pubDate>Thu, 02 Jul 2009 13:25:19 GMT</pubDate><guid isPermaLink="false">8c320e6c-c1a2-4353-93c8-95785067d6bc:2093</guid><dc:creator>mmalm</dc:creator><slash:comments>0</slash:comments><comments>http://community.sageaccpac.com/forums/thread/2093.aspx</comments><wfw:commentRss>http://community.sageaccpac.com/forums/commentrss.aspx?SectionID=17&amp;PostID=2093</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Found the answer, thanks to the dev blog.&amp;nbsp; The Values() function gets me the info I need:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;var strNewEIN = Values(&amp;quot;comp_EIN&amp;quot;)&lt;/p&gt;
&lt;p&gt;// sql string that will do the update for this company&lt;/p&gt;
&lt;p&gt;sql = &amp;quot;UPDATE Company SET comp_ssnein=&amp;quot; + strNewEIN + &amp;quot; WHERE comp_CompanyId=&amp;quot; + eWare.GetContextInfo(&amp;#39;Company&amp;#39;,&amp;#39;Comp_CompanyId&amp;#39;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Update Table Script - Get Latest Data</title><link>http://community.sageaccpac.com/forums/thread/2089.aspx</link><pubDate>Thu, 02 Jul 2009 11:06:14 GMT</pubDate><guid isPermaLink="false">8c320e6c-c1a2-4353-93c8-95785067d6bc:2089</guid><dc:creator>mmalm</dc:creator><slash:comments>0</slash:comments><comments>http://community.sageaccpac.com/forums/thread/2089.aspx</comments><wfw:commentRss>http://community.sageaccpac.com/forums/commentrss.aspx?SectionID=17&amp;PostID=2089</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;m attempting to craft an update table script that takes the information stored in Field A and adds it to Field B, depending on certain conditions.&amp;nbsp; I managed to get the script to work, but if the script is triggered by editing the data in Field A, Field B gets updated with the old value of Field A, not the new value.&lt;/p&gt;
&lt;p&gt;Example.&lt;/p&gt;
&lt;p&gt;Field A has a value of 1234&lt;/p&gt;
&lt;p&gt;Field A is modified to have a value of 12345&lt;/p&gt;
&lt;p&gt;Update table script fires after edit is saved, and Field B now has a value of 1234.&lt;/p&gt;
&lt;p&gt;Is there any way to refer to the post-update value in the table script?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;My Script:&lt;/p&gt;
&lt;p&gt;// if comp_EIN is greater than zero, append it to comp_ssnein&lt;/p&gt;
&lt;p&gt;if (comp_EIN &amp;gt; 0 &amp;amp;&amp;amp; comp_classification == &amp;#39;Employer&amp;#39;) {&lt;/p&gt;
&lt;p&gt;// sql string that will do the update for this company&lt;/p&gt;
&lt;p&gt;sql = &amp;quot;UPDATE Company SET comp_ssnein=comp_EIN WHERE comp_CompanyId=&amp;quot; + eWare.GetContextInfo(&amp;#39;Company&amp;#39;,&amp;#39;Comp_CompanyId&amp;#39;)&lt;br /&gt;UpdateQuery = eWare.CreateQueryObj(sql);&lt;br /&gt;UpdateQuery.ExecSql();}&lt;br /&gt;}&lt;/p&gt;</description></item></channel></rss>