<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Apex Flow Control &#8211; Preventing Infinite Loops</title>
	<atom:link href="http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/</link>
	<description>Force.com - jQuery - Technology - Life</description>
	<lastBuildDate>Sun, 05 Feb 2012 03:04:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Jason</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-2456</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 24 Nov 2010 21:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-2456</guid>
		<description>Alex,

This is a huge painpoint for package creators and consumers. I haven&#039;t heard of any ways to get around this. There is an idea here: https://sites.secure.force.com/ideaexchange/apex/ideaView?id=08730000000BrhyAAC and someone has mentioned work arounds but I am not familiar with any.</description>
		<content:encoded><![CDATA[<p>Alex,</p>
<p>This is a huge painpoint for package creators and consumers. I haven&#8217;t heard of any ways to get around this. There is an idea here: <a href="https://sites.secure.force.com/ideaexchange/apex/ideaView?id=08730000000BrhyAAC" rel="nofollow">https://sites.secure.force.com/ideaexchange/apex/ideaView?id=08730000000BrhyAAC</a> and someone has mentioned work arounds but I am not familiar with any.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex S.</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-2455</link>
		<dc:creator>Alex S.</dc:creator>
		<pubDate>Wed, 24 Nov 2010 17:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-2455</guid>
		<description>Jason, any ideas on how you can prevent an &quot;asymmetric&quot; occurrence of &quot;Future method cannot be called from a future method&quot; as a developer of a managed package app? i.e. the customer installs your managed package app which includes an @future method triggered from an object transaction (Opportunity for example), but they have an @future method which updates the Opportunity object, and their code can&#039;t talk to your app to communicate the @future context?</description>
		<content:encoded><![CDATA[<p>Jason, any ideas on how you can prevent an &#8220;asymmetric&#8221; occurrence of &#8220;Future method cannot be called from a future method&#8221; as a developer of a managed package app? i.e. the customer installs your managed package app which includes an @future method triggered from an object transaction (Opportunity for example), but they have an @future method which updates the Opportunity object, and their code can&#8217;t talk to your app to communicate the @future context?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TRD</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-657</link>
		<dc:creator>TRD</dc:creator>
		<pubDate>Tue, 23 Mar 2010 20:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-657</guid>
		<description>You saved the day!  Good code and diagram.</description>
		<content:encoded><![CDATA[<p>You saved the day!  Good code and diagram.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder312</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-325</link>
		<dc:creator>Coder312</dc:creator>
		<pubDate>Fri, 18 Dec 2009 20:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-325</guid>
		<description>Great advice - thanks for sharing this! Your touch of humor helps the medicine go down :-)</description>
		<content:encoded><![CDATA[<p>Great advice &#8211; thanks for sharing this! Your touch of humor helps the medicine go down <img src='http://www.tehnrd.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-217</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 09 Oct 2009 16:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-217</guid>
		<description>As chance may have it Jeff Douglas posted about this exact issue on the same exact day as me. The concept is the same but the code is a little different. 

Check it out here: http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/</description>
		<content:encoded><![CDATA[<p>As chance may have it Jeff Douglas posted about this exact issue on the same exact day as me. The concept is the same but the code is a little different. </p>
<p>Check it out here: <a href="http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/" rel="nofollow">http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-214</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 09 Oct 2009 05:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-214</guid>
		<description>K1rk, you are correct. The utility.isFutureUpdate boolean will only stay true for the context of the current apex transaction. So if the @future method updates accounts which then causes additional triggers to execute they will all see this as true. As soon as all code has executed the value will return to null.</description>
		<content:encoded><![CDATA[<p>K1rk, you are correct. The utility.isFutureUpdate boolean will only stay true for the context of the current apex transaction. So if the @future method updates accounts which then causes additional triggers to execute they will all see this as true. As soon as all code has executed the value will return to null.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: K1rk</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-213</link>
		<dc:creator>K1rk</dc:creator>
		<pubDate>Thu, 08 Oct 2009 19:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-213</guid>
		<description>A great post.  Can you clarify, however, how (or when) the static variable utility.isFutureUpdate becomes null or false again?  I see where it&#039;s set to true in the futureMethods class... does it stay true globally (so the trigger sees it as true) only as long as that futureMethods class is still running?  In other words, when futureMethods finishes, is that when isFutureUpdate becomes null again?</description>
		<content:encoded><![CDATA[<p>A great post.  Can you clarify, however, how (or when) the static variable utility.isFutureUpdate becomes null or false again?  I see where it&#8217;s set to true in the futureMethods class&#8230; does it stay true globally (so the trigger sees it as true) only as long as that futureMethods class is still running?  In other words, when futureMethods finishes, is that when isFutureUpdate becomes null again?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajesh Shah</title>
		<link>http://www.tehnrd.com/apex-flow-control-preventing-infinite-loops/comment-page-1/#comment-201</link>
		<dc:creator>Rajesh Shah</dc:creator>
		<pubDate>Mon, 05 Oct 2009 11:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.tehnrd.com/?p=272#comment-201</guid>
		<description>Thanks. I always wondered how to use static variables to prevent Infinite loops. Now it is clear.</description>
		<content:encoded><![CDATA[<p>Thanks. I always wondered how to use static variables to prevent Infinite loops. Now it is clear.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

