<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
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/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>examples | Taha Syed | Salesforce</title>
<atom:link href="https://www.syedtaha.com/tag/examples/feed/" rel="self" type="application/rss+xml" /><link>https://www.syedtaha.com</link>
<description>Taha Syed &#124; Sales to Salesforce &#124; Dissecting and Defining the Rationale..</description>
<lastBuildDate>Mon, 03 Dec 2018 21:24:36 +0000</lastBuildDate>
<language>en-US</language>
<sy:updatePeriod>
hourly	</sy:updatePeriod>
<sy:updateFrequency>
1	</sy:updateFrequency>
<generator>https://wordpress.org/?v=6.9.4</generator>
<item><title>Learn Salesforce Triggers with Examples and Scenarios</title><link>https://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/</link>
<comments>https://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/#respond</comments>
<dc:creator><![CDATA[Taha Syed]]></dc:creator>
<pubDate>Mon, 15 Oct 2018 20:41:31 +0000</pubDate>
<category><![CDATA[Apex Triggers]]></category>
<category><![CDATA[apex triggers]]></category>
<category><![CDATA[beginners]]></category>
<category><![CDATA[examples]]></category>
<category><![CDATA[salesforce]]></category>
<category><![CDATA[scenarios]]></category>
<category><![CDATA[triggers]]></category>
<category><![CDATA[triggers with examples]]></category>
<guid
isPermaLink="false">http://www.syedtaha.com/?p=1072</guid><description><![CDATA[<p>Learn Salesforce Apex Triggers with examples and scenarios by dissecting them line by line. This List of Salesforce Triggers is for beginners to practice and learn.</p>
The post <a
href="https://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/">Learn Salesforce Triggers with Examples and Scenarios</a> first appeared on <a
href="https://www.syedtaha.com">Taha Syed | Salesforce</a>.]]></description>
<content:encoded><![CDATA[<h1>Learn Salesforce Triggers with Examples and Scenarios.</h1><p>&nbsp;</p><p>This post is dedicated to learning Salesforce triggers with examples and scenarios by dissecting them line by line. All triggers will be written with plenty of comments and explanations so that its easier for us to understand and implement.</p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/write-your-first-hello-world-salesforce-apex-trigger-triggers-for-beginners/946/" target="_blank" rel="noopener"><strong>Write Your First Hello World Salesforce Apex Trigger – Triggers for Beginners</strong></a></li></ul><p
style="text-align: left; padding-left: 30px;"><em>The <strong>“Hello World”</strong> program is the simplest program used to illustrate the basic syntax of a programming language. The program outputs “Hello World” and is traditionally the first program written by all beginner developers. Our <strong>Hello World </strong>trigger&#8217;s requirement is: <strong>When a Lead is updated, update the lead’s first name to ‘Hello’ and the last name to ‘World’</strong></em></p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/trigger-to-change-the-stage-when-opportunity-is-created-triggers-for-beginners/979/" target="_blank" rel="noopener"><strong>Trigger to Change the Stage when an Opportunity is created</strong></a></li></ul><p
style="padding-left: 30px;"><em>Every time an Opportunity is created (and the user selects any Stage), the <strong>Opportunity Stage</strong> should change and default to <strong>Prospecting. </strong></em></p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/trigger-to-create-task-when-opportunity-is-updated-salesforce-apex-triggers/958/" target="_blank" rel="noopener"><strong>Trigger to create a task when an Opportunity is updated</strong></a></li></ul><p
style="padding-left: 30px;"><em>When an Opportunity is updated, a new <strong>Task</strong> should be <strong>created</strong> and assigned to the <strong>Opportunity Owner</strong>. The status of the task should be &#8220;In Progress&#8221;</em></p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/trigger-to-roll-up-summary-contacts-field-to-accounts/1016/" target="_blank" rel="noopener"><strong>Trigger to create a roll-up summary of Contact&#8217;s fields on Accounts</strong></a></li></ul><p
style="padding-left: 30px;"><em>On each Account, the Total Salary custom field should hold the sum of Salaries from its associated Contacts. The trigger should work whenever a Contact’s Salary is updated, New Contact is Created or when an existing Contact is deleted.</em></p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/salesforce-apex-trigger-to-prevent-duplicate-contacts-by-email-or-phone-number/897/" target="_blank" rel="noopener"><strong>Trigger to Prevent Duplicate Contacts</strong></a></li></ul><p
style="text-align: left; padding-left: 30px;"><em>When a <strong>Contact</strong> is being <strong>created</strong> and if a record with the same <strong>Email Id or Phone number exists</strong>, the <strong>trigger</strong> should throw an <strong>error</strong> and the <strong>User</strong> should <strong>not</strong> be <strong>allowed</strong> to <strong>create</strong> the <strong>Duplicate Contact</strong></em></p><p>&nbsp;</p><ul><li><a
href="http://www.syedtaha.com/salesforce-apex-triggers/trigger-to-post-automated-random-chatter-comment/1099/" target="_blank" rel="noopener"><strong>Trigger to Post Automated Random Chatter Comment</strong></a></li></ul><p
style="padding-left: 30px;">When a user posts to chatter and if the user&#8217;s post contains the term &#8220;Success&#8221;, an automated comment should be posted. This comment should be randomly selected from a list of comments; And should be posted as a specific user.</p><p
style="padding-left: 30px;"><em><strong> </strong></em></p><p>&nbsp;</p><p>Please support this post by linking it from your website/blog<br
/>
<a
href="http://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/">http://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/</a></p>The post <a
href="https://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/">Learn Salesforce Triggers with Examples and Scenarios</a> first appeared on <a
href="https://www.syedtaha.com">Taha Syed | Salesforce</a>.]]></content:encoded>
<wfw:commentRss>https://www.syedtaha.com/salesforce-apex-triggers/learn-salesforce-triggers-with-examples-and-scenarios/1072/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
</channel>
</rss>