<?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: Trigger for OpportunityContactRole on Close</title>
	<atom:link href="http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/feed/" rel="self" type="application/rss+xml" />
	<link>http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/</link>
	<description>a force.com blog</description>
	<lastBuildDate>Thu, 29 Jul 2010 23:10:55 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: The Enforcer</title>
		<link>http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/comment-page-1/#comment-71045</link>
		<dc:creator>The Enforcer</dc:creator>
		<pubDate>Fri, 09 Oct 2009 20:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://theenforcer.net/?p=57#comment-71045</guid>
		<description>Meghan,

Yes, this code is open to exceeding the Governor limits. It should only be used where you know it will not be triggered in bulk.

For example, if you&#039;re just checking whether an end-user has updated some fields, it should be safe. However, if it can be triggered via, say, a bulk load via the Data Loader then you&#039;ll need to code as few DML statements (eg SELECT, UPDATE) as possible -- this takes a bit of thought, but can typically be done by loading lists and manipulating them in memory.</description>
		<content:encoded><![CDATA[<p>Meghan,</p>
<p>Yes, this code is open to exceeding the Governor limits. It should only be used where you know it will not be triggered in bulk.</p>
<p>For example, if you&#8217;re just checking whether an end-user has updated some fields, it should be safe. However, if it can be triggered via, say, a bulk load via the Data Loader then you&#8217;ll need to code as few DML statements (eg SELECT, UPDATE) as possible &#8212; this takes a bit of thought, but can typically be done by loading lists and manipulating them in memory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meghan</title>
		<link>http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/comment-page-1/#comment-71038</link>
		<dc:creator>Meghan</dc:creator>
		<pubDate>Thu, 01 Oct 2009 17:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://theenforcer.net/?p=57#comment-71038</guid>
		<description>I&#039;ll preface with the clarification that I am a total newbie to Apex / Triggers.

Using your example above, I wrote a trigger to pull the Primary Contact information from the Related Contact list to the Contract.  I was able to build a trigger that brings the Primary Contact ID onto the Contract from the Related Contact Object (using both the ContactID as part of a WIL for a custom email button - also need to pull the Contact Name for use in an email template - but that&#039;s another issue)

I posted a question about using the ContactID populated from the trigger and another community member commented that I will run into Governor limits because the Select statement is in the For Loop.  Your trigger above has that same format - how did you approach the Governor limits issue?</description>
		<content:encoded><![CDATA[<p>I&#8217;ll preface with the clarification that I am a total newbie to Apex / Triggers.</p>
<p>Using your example above, I wrote a trigger to pull the Primary Contact information from the Related Contact list to the Contract.  I was able to build a trigger that brings the Primary Contact ID onto the Contract from the Related Contact Object (using both the ContactID as part of a WIL for a custom email button &#8211; also need to pull the Contact Name for use in an email template &#8211; but that&#8217;s another issue)</p>
<p>I posted a question about using the ContactID populated from the trigger and another community member commented that I will run into Governor limits because the Select statement is in the For Loop.  Your trigger above has that same format &#8211; how did you approach the Governor limits issue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Enforcer</title>
		<link>http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/comment-page-1/#comment-65</link>
		<dc:creator>The Enforcer</dc:creator>
		<pubDate>Fri, 17 Oct 2008 01:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://theenforcer.net/?p=57#comment-65</guid>
		<description>This is Apex code. If you are unfamiliar with Apex, please see &lt;a href=&quot;http://wiki.apexdevnet.com/index.php/Apex_Intro&quot; rel=&quot;nofollow&quot;&gt;An Introduction to Apex&lt;/a&gt;, which is an excellent introductory guide.

As to updating a field on a Contact when an Opportunity is won, I would recommend directing your question to the &lt;a href=&quot;http://community.salesforce.com/sforce?category.id=developers&quot; rel=&quot;nofollow&quot;&gt;Force.com Discussion Boards&lt;/a&gt;. Please provide an explanation of what you are trying to accomplish, and please also explain WHY, since there might be a better way to achieve your goal.</description>
		<content:encoded><![CDATA[<p>This is Apex code. If you are unfamiliar with Apex, please see <a href="http://wiki.apexdevnet.com/index.php/Apex_Intro" rel="nofollow">An Introduction to Apex</a>, which is an excellent introductory guide.</p>
<p>As to updating a field on a Contact when an Opportunity is won, I would recommend directing your question to the <a href="http://community.salesforce.com/sforce?category.id=developers" rel="nofollow">Force.com Discussion Boards</a>. Please provide an explanation of what you are trying to accomplish, and please also explain WHY, since there might be a better way to achieve your goal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Enforcer</title>
		<link>http://theEnforcer.net/2008/10/trigger-for-opportunitycontactrole-on-close/comment-page-1/#comment-63</link>
		<dc:creator>The Enforcer</dc:creator>
		<pubDate>Thu, 16 Oct 2008 20:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://theenforcer.net/?p=57#comment-63</guid>
		<description>The day after I wrote this blog post, a person on the Salesforce Community asked for &lt;a href=&quot;http://community.salesforce.com/sforce/board/message?board.id=apex&amp;thread.id=8761&quot; rel=&quot;nofollow&quot;&gt;exactly the same thing&lt;/a&gt;.

Ha, it&#039;s amazing how the universe works sometimes!</description>
		<content:encoded><![CDATA[<p>The day after I wrote this blog post, a person on the Salesforce Community asked for <a href="http://community.salesforce.com/sforce/board/message?board.id=apex&#038;thread.id=8761" rel="nofollow">exactly the same thing</a>.</p>
<p>Ha, it&#8217;s amazing how the universe works sometimes!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
