<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/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>Method:Classic General Q&amp;amp;A</title><link>http://forums.method.me/cs/forums/13.aspx</link><description>Ask technical support questions, how do I? Questions... Or anything else you want to know from the Method Team and other Method users.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11864.aspx</link><pubDate>Wed, 18 Apr 2012 16:08:59 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11864</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11864.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11864</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/cs/Themes/methodtheme/images/icon-quote.gif"&gt; &lt;strong&gt;smohyee:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I assume running through the AR is more resource efficient than running through the value on screen when used by multiple functions.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Using the AR &lt;i&gt;might&lt;/i&gt; be a little more resource efficient but the biggest reason for using an AR is code reuseability.&lt;/p&gt;
&lt;p&gt;~C&lt;/p&gt;</description></item><item><title>Re: Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11817.aspx</link><pubDate>Fri, 13 Apr 2012 22:46:51 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11817</guid><dc:creator>smohyee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11817.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11817</wfw:commentRss><description>&lt;p&gt;Thanks for looking into it! I assume running through the AR is more resource efficient than running through the value on screen when used by multiple functions. It&amp;#39;s useful to know that sort of optimization, since Method&amp;#39;s speed is an issue. &lt;/p&gt;
&lt;p&gt;I wonder if that&amp;#39;s a universal rule for Method optimization: &amp;quot;When using multiple actions involving a piece of data, it is better to load that data into an Action Result than reference it&amp;#39;s value on the screen&amp;quot;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11809.aspx</link><pubDate>Fri, 13 Apr 2012 19:36:27 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11809</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11809.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11809</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/cs/Themes/methodtheme/images/icon-quote.gif"&gt; &lt;strong&gt;smohyee:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;...if I type in &amp;quot;Vendor&amp;quot; into the&amp;nbsp;&amp;quot;replace from table&amp;quot;&amp;nbsp;&amp;nbsp;field, and put my desired Vendor record ID as an Action Result in the next field, then the function will go lookup every merge field in my template...&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Correct. &amp;nbsp;Method is quite clever with the merge function! &amp;nbsp;When you use the &lt;i&gt;Character Function&lt;/i&gt; to merge fields you only need to specify the table and a recordID - Method with then replace any merge fields with the correct information from that record (provided the information exists).&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/cs/Themes/methodtheme/images/icon-quote.gif"&gt; &lt;strong&gt;smohyee:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;...the only field I need to add to the Activity table would be for the PO Record ID...&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Exactly.&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/cs/Themes/methodtheme/images/icon-quote.gif"&gt; &lt;strong&gt;smohyee:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I notice in the preexisting merge field actions in the &lt;i&gt;New Activity&lt;/i&gt;&amp;nbsp;screen, the email body is loaded into an AR and then referenced. Is there any particular reason why it is used as an AR, instead of just pointing to the email body &amp;quot;Value on Screen&amp;quot;?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;There are multiple &lt;i&gt;Character Merge&amp;#39;s&lt;/i&gt; going on with this page (which is why I wanted you to have a look). &amp;nbsp;Basically, the entire body is loaded in the AR then run through several &lt;i&gt;merge&amp;#39;s&lt;/i&gt;, one for each table. &amp;nbsp;I believe I gained 10 Method IQ points today digging into this screen for your question.&lt;/p&gt;
&lt;p&gt;Thanks for the question!&lt;/p&gt;
&lt;p&gt;~C&lt;/p&gt;
&lt;/p&gt;</description></item><item><title>Re: Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11807.aspx</link><pubDate>Fri, 13 Apr 2012 17:59:24 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11807</guid><dc:creator>smohyee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11807.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11807</wfw:commentRss><description>&lt;p&gt;Thanks Chad, just the sort of thing I was looking for!&lt;/p&gt;
&lt;p&gt;I checked out the examples of the &lt;i&gt;merge field &lt;/i&gt;suboption of the &lt;i&gt;character function&lt;/i&gt;&amp;nbsp;action.&amp;nbsp;So if I understand this correctly, if I type in &amp;quot;Vendor&amp;quot; into the&amp;nbsp;&amp;quot;replace from table&amp;quot;&amp;nbsp;&amp;nbsp;field, and put my desired Vendor record ID as an Action Result in the next field, then the function will go lookup every merge field in my template referencing the Vendor table (Vendor.FullName, Vendor.BillCity), and replace it with that particular record&amp;#39;s data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Or, as another example: If I want to email a Purchase Order PDF to a vendor in the &lt;i&gt;New Activity&lt;/i&gt; screen, the only field I need to add to the Activity table would be for the PO Record ID (since &amp;nbsp;I use that screen to send all my order reports, I call it &amp;quot;RelatedRecordID&amp;quot;, and I have a second field for &amp;quot;RelatedReportType&amp;quot; to specify that its a Purchase Order record).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then I can create a conditional statement in the &lt;i&gt;Choose Template&lt;/i&gt;&amp;nbsp;action list in the &lt;i&gt;New Activity&lt;/i&gt;&amp;nbsp;screen&amp;nbsp;saying that if the RelatedReportType is &amp;quot;Purchase Order&amp;quot;, then grab the RelatedRecordID as an AR, and use the character function to specify that every PurchaseOrder merge field in the template should reference that RecordID. That way I can get the right vendor name (presumably all the preexisting &amp;quot;entity&amp;quot; based actions in that list wouldn&amp;#39;t work, because there&amp;#39;s no way for them to know that by &amp;quot;Vendor&amp;quot; I mean the preferred vendor selected for my PO...)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I notice in the preexisting merge field actions in the &lt;i&gt;New Activity&lt;/i&gt;&amp;nbsp;screen, the email body is loaded into an AR and then referenced. Is there any particular reason why it is used as an AR, instead of just pointing to the email body &amp;quot;Value on Screen&amp;quot;?&lt;/p&gt;</description></item><item><title>Re: Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11806.aspx</link><pubDate>Fri, 13 Apr 2012 16:43:34 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11806</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11806.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11806</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/cs/Themes/methodtheme/images/icon-quote.gif"&gt; &lt;strong&gt;smohyee:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;...the merge fields use the active record ID for the current screen/table the template is loaded into.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;The merge is not always based off active RecordID. &amp;nbsp;Replacing merge fields relies on the &lt;i&gt;Character Function&lt;/i&gt; action, specifically the option &lt;i&gt;Replace &amp;lt;&amp;lt;merge&amp;gt;&amp;gt; fields&lt;/i&gt;. &amp;nbsp;Take a look the action and you&amp;rsquo;ll see one of the parameters requires the designer to specify or Locate using RecordID. &amp;nbsp;This is basically asking which record you want to use to replace the merge fields and can be done many ways including Retrieve Value From Table calls.&lt;/p&gt;
&lt;p&gt;Have a look at the &lt;i&gt;New Activity&lt;/i&gt; screen under the &lt;i&gt;Send An Email&lt;/i&gt; section inside the &lt;i&gt;Choose Template&lt;/i&gt;&amp;nbsp;dropdown actions. &amp;nbsp; You&amp;#39;ll see how the email template for &lt;i&gt;Overdue Balance&lt;/i&gt; contains merge fields from multiple tables.&lt;/p&gt;
&lt;p&gt;One &lt;span style="text-decoration:underline;"&gt;important&lt;/span&gt; tip for you is&amp;nbsp;to use only one character function to replace merge fields per table. &amp;nbsp;For example, if you have 5 merge fields coming from the customer table, &amp;nbsp;one action will replace 5. &amp;nbsp;However, you must a separate character function for merge fields coming from other tables.&lt;/p&gt;
&lt;p&gt;The email templates are quite powerful but a little tough to get a grasp on initially. &amp;nbsp;Have a look at the action set I mentioned above and you should have enough knowledge to go on.&lt;/p&gt;
&lt;p&gt;~C&lt;/p&gt;</description></item><item><title>Email template merge fields: how does it determine table/active record?</title><link>http://forums.method.me/cs/forums/thread/11800.aspx</link><pubDate>Thu, 12 Apr 2012 23:17:37 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:11800</guid><dc:creator>smohyee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/11800.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=11800</wfw:commentRss><description>&lt;p&gt;Tell me if I&amp;#39;m right: the merge fields use the active record ID for the current screen/table the template is loaded into. It seems to also know that when I reference fields from the &amp;quot;User&amp;quot; table, that I want the record of the User currently logged in.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a way to indicate to the template/merge field what recordID I want to reference for a given table?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m setting up my system so all outgoing method emails are going through the activity screen, including order reports like Invoices and POs. When I open an email popup from the PO screen, for example, I only insert the PO RecordID &amp;nbsp;into the Activity Table (for the sake of generating the report). What if I want to reference the Vendor name in the email template? &lt;/p&gt;
&lt;p&gt;Do I need to create a field in the Activity table for the Vendor name, and every other field I will want to use in my various email templates? Or can I reference a specific recordID for a given table in the merge field code in the template itself?&lt;/p&gt;</description></item></channel></rss>