tag:blogger.com,1999:blog-53473798162137700422023-11-15T08:11:09.003-08:00Salesforce FAQ'sEdwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-5347379816213770042.post-78286065909942478302016-05-25T16:37:00.000-07:002016-05-25T16:37:12.594-07:00How to call an Apex class from Visual Workflow<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="text-align: left;">
<li>Using the @InvocableMethod or the Process.Plugin interface.</li>
<li>Salesforce recommends using the @InvocableMethod </li>
<li>Apex methods that are annotated with this can be called directly from a visual workflow.</li>
<li>Methods that can be invoked have restrictions on the parameters that can be passed and the parameters that can be received.</li>
<li><a href="https://help.salesforce.com/apex/HTViewHelpDoc?id=vpm_designer_elements_apex.htm&language=en_US" target="_blank">Check here</a> for more details.</li>
</ul>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-66694187494920113382016-05-23T16:25:00.001-07:002016-05-23T16:25:47.141-07:00What are the different report formats available in salesforce?<div dir="ltr" style="text-align: left;" trbidi="on">
<ol style="text-align: left;">
<li>Tabular: Displays a list of records in table format</li>
<li>Summary: Let's you summarize the data, view sub totals and group report data.</li>
<li>Matrix: Similar to summary, but let's you group totals by ROWs and COLUMNs. Ex: group opportunities by stage and further group by close month.</li>
<li>Joined: Let's you create multiple blocks of individual reports to give you an overall perspective of data from multiple objects. Note that these can include different report types.</li>
</ol>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-13209757190152018192015-11-17T11:25:00.002-08:002015-11-17T11:25:44.449-08:00What are the various added USER Login security features provided by Salesforce<div dir="ltr" style="text-align: left;" trbidi="on">
Login Hours and IP ranges:<br />
<br />
Salesforce let's you specify the Login Hours and the Login IP ranges at the profile level which allows a Salesforce Administrator to restrict access to Salesforce to only certain group of users.<br />
<br />
Two-Factor Authentication:<br />
<br />
This feature of Salesforce requires the user to use a temporary 6 digit code in addition to username/password to login to Salesforce. This temporary 6 digit code is generated by an application (Salesforce Authenticator / Google Authenticator) that the user will have to install on his/her mobile device. This code changes every 30 seconds.</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-47219239439714813752015-11-17T11:17:00.001-08:002015-11-17T11:17:46.049-08:00What is SSO and what are the different options available with Salesforce<div dir="ltr" style="text-align: left;" trbidi="on">
SSO or Single-Sign-On is the capability to access multiple applications using a single username/password, thereby eliminating the need to remember multiple usernames/passwords.<br />
<br />
A common use case is a company's SSO which allows employees to access multiple applications like HR, Travel, Salesforce.com etc all using their LDAP username/password.<br />
<br />
Salesforce offers two methods: Delegated Authentication and SAML based Federated Authentication</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-19180199010384246292015-10-13T16:48:00.002-07:002015-10-13T16:48:59.620-07:00What is JIT or Just In Time provisioning<div dir="ltr" style="text-align: left;" trbidi="on">
JIT or Just-In-Time provisioning is a feature of SSO(Single-Sign-On) which enables real-time user provisioning for access to Salesforce.com.<br />
<br />
In simple terms, when a user tries to login from an external system using SSO and if the user does not already exists in Salesforce, JIT creates the user account in real time and logs the user into Salesforce.</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-59714795067733077722015-10-13T16:44:00.000-07:002015-10-13T16:44:06.282-07:00How will you create a Many : Many relationship in Salesforce<div dir="ltr" style="text-align: left;" trbidi="on">
<ol style="text-align: left;">
<li>Create a junction object.</li>
<li>Create two master detail relationship fields on the junction object with object 1 and object 2.</li>
</ol>
More details: <a href="https://help.salesforce.com/HTViewHelpDoc?id=relationships_manytomany.htm" target="_blank">https://help.salesforce.com/HTViewHelpDoc?id=relationships_manytomany.htm </a></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-14981534698479038472015-09-15T11:46:00.000-07:002015-09-15T11:46:18.311-07:00Who can DELETE a record in Salesforce?<div dir="ltr" style="text-align: left;" trbidi="on">
The General rule is as below:<br />
<b class="feedText" style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: sf-font-regular, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13.008px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: auto; position: relative; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;"></b><br />
<div class="feedcommenttext" id="ext-gen18" style="line-height: 20px; margin-top: 5px; overflow: hidden; padding-top: 8px;">
<div id="ext-gen17">
<b class="feedText" style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: sf-font-regular, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13.008px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: auto; position: relative; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;"><span id="ext-gen16"><span id="ext-gen15">You can delete a record if you are an administrator, the record owner, or a user above the record owner in the organization role hierarchy, and if you have the appropriate user permission (meaning DELETE permission at the profile level on the object)<span class="Apple-converted-space"> </span></span></span></b></div>
</div>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-35804387132755908882015-08-29T12:12:00.002-07:002015-08-29T12:12:33.882-07:00What is the difference between a PROFILE and PERMISSION SET<div dir="ltr" style="text-align: left;" trbidi="on">
PROFILE:<br />
A profile is generally used to define the permissions and access levels for a certain group of users. Every user can have only one profile.<br />
<br />
PERMISSION SET:<br />
A permission set is generally used to define permissions and access levels for individual users. A common use case is to define additional access for some users belonging to the same profile without creating a new profile. Every user can have one or more permission sets.</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-8846179022372523382015-06-02T16:17:00.000-07:002015-06-02T16:18:07.787-07:00What are the differences between SOQL and SOSL?<div dir="ltr" style="text-align: left;" trbidi="on">
SOQL - Salesforce Object Query Language<br />
<br />
Let's you query a table in salesforce. You can have nested queries. Returns a list of sobject records.<br />
Example: List<Account> aa = [SELECT Id, Name FROM Account WHERE Name = 'Acme'];<br />
<br />
SOSL - Salesforce Object Search Language<br />
<br />
Let's you search for a term in multiple objects. Return a list of list of sobject records.<br />
Example:List<List<SObject>> searchList = [FIND 'map*' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead];<br />
<br />
Further reading: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL.htm </div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com1tag:blogger.com,1999:blog-5347379816213770042.post-65362230204457695162015-05-06T14:42:00.002-07:002015-05-06T14:42:58.816-07:00What are the different types of controllers you can use in a visualforce page<div dir="ltr" style="text-align: left;" trbidi="on">
There are three types:<br />
<ol style="text-align: left;">
<li>Standard - Let's you access the standard functions (Save, Edit, Delete etc) of a standard or custom object.</li>
<li>Custom - Let's you add custom functionality by specifying an apex class that can define new functions for user actions (button clicks, link clicks etc).</li>
<li>Controller Extensions - Is a combination of Standard and Custom controllers.</li>
</ol>
Note: <br />
You can have either a Standard or a Custom controller, but you cannot have both at the same time<br />
Controller Extensions can have more than one Apex Class. </div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com2tag:blogger.com,1999:blog-5347379816213770042.post-26289359998811487522014-05-01T11:55:00.003-07:002014-05-01T11:55:52.864-07:00If the OWD (Organization Wide Default) of Account's is PRIVATE, what users have access to any particular account.<div dir="ltr" style="text-align: left;" trbidi="on">
The Account Owner (full access)<br />
<br />
Users above the Account Owner in the Role Hierachy (full access)<br />
<br />
Account Team Members (access defined while adding team member)<br />
<br />
Users to whom the Account has been manually shared by clicking the 'Sharing' button on the detail page (access defined while sharing)</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com1tag:blogger.com,1999:blog-5347379816213770042.post-27787632730143380402014-05-01T11:51:00.001-07:002014-05-01T11:51:14.701-07:00What is the Difference between a PROFILE and a Permission Set<div dir="ltr" style="text-align: left;" trbidi="on">
A User can have only ONE Profile.<br />
A User can have multiple Permission Sets.<br />
<br />
A Permission set is a subset of permissions which can be applied to a group of users who are spread across multiple profiles. Permission sets eliminate the need to create multiple profiles to address each and every minor modification.<br />
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-83290330723179051692014-05-01T11:46:00.001-07:002014-05-01T11:46:12.231-07:00When can you NOT add time-dependent workflow actions?<div dir="ltr" style="text-align: left;" trbidi="on">
When the Evaluation criteria is set to the following.<br />
<br />
<div style="text-align: left;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #4a4a56; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; text-align: right; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Evaluate the rule when a record is: <span style="color: red;">created, and everytime it's edited</span>.</span></div>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-10946319207814844892014-03-28T10:51:00.000-07:002014-03-28T10:54:06.940-07:00Which of the following are valid ways to migrate metadata?<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">A. Data Loader</span></div>
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">B. Change Sets</span></div>
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">C. Force.com IDE</span></div>
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">D. ANT Migration Toolkit</span></div>
<div style="background-color: white;">
<br style="color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /></div>
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Answer: B,C,D</span></div>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-37444451974297553252014-03-28T10:50:00.006-07:002014-03-28T10:50:37.867-07:00What is the Difference Between Render, Rerender, RenderAs?<div dir="ltr" style="text-align: left;" trbidi="on">
<strong style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><u>Render</u></strong><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="Apple-converted-space"> </span>it is used to show and hide elements works like css in general we can say display properties</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><strong style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><u>Rerender</u></strong><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="Apple-converted-space"> </span>is used when you want to refresh only a portion</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><strong style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><u>RenderAs</u></strong><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="Apple-converted-space"> </span>providing extension of page to create output like pdf, doc, excel</span></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-16895655995388421902014-03-28T10:50:00.002-07:002014-03-28T10:50:09.483-07:00Is the @future invocation synchronous or asynchronous?, what are some limitations of the @future<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">@future callouts are asynchronous, meaning that after a callout is made the system continues with execution of the remaining methods without waiting for a response from the callout. The callout is made by salesforce when it has available resources to make it.</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Some limitations are:</span><br />
<ul class="ul" style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-left: 1.5em; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<li class="li" style="font-size: 12px; list-style-type: square; margin-left: 1em; padding-left: 0px;">No more than <span class="ph">10</span> method calls per <span class="ph">Apex</span> invocation Note<div class="noteBody" style="font-size: 12px; margin-left: 10px;">
<img align="left" src="http://www.salesforce.com/us/developer/docs/apexcode/Content/images/help/helpNote_icon.gif" style="border: 0px;" />Asynchronous calls, such as <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">@future</samp> or <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">executeBatch</samp>, called in a <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">startTest</samp>, <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">stopTest</samp> block, do not count against your limits for the number of queued jobs.</div>
</li>
<li class="li" style="font-size: 12px; list-style-type: square; margin-left: 1em; padding-left: 0px;"><span class="ph"><span class="ph"><span class="ph">Salesforce</span></span> also imposes a limit on the number of <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">future</samp> method invocations: 200 method calls per full <span class="ph"><span class="ph">Salesforce</span></span> user license, <span class="ph"><span class="ph">Salesforce</span></span> Platform user license, or <span class="ph">Force.com</span> - One App user license, per 24 hours. This is an organization-wide limit. <span class="ph">Chatter</span>Only, <span class="ph">Chatter</span> customer users, <span class="ph">Customer Portal User</span>, and <span class="ph">partner portal</span> User licenses aren’t included in this limit calculation. <span class="ph"><a href="https://www.blogger.com/blogger.g?blogID=5347379816213770042" id="d7349e619" name="d7349e619" style="color: #333333; text-decoration: underline;"></a>For example, suppose your organization has three full <span class="ph"><span class="ph">Salesforce</span></span> licenses, two Salesforce Platform licenses, and 100 <span class="ph">Customer Portal User</span> licenses. Your entire organization is limited to only 1,000 method calls every 24 hours, calculated as 200 * (3+2), not 200 * (3+2+100).</span></span></li>
<li class="li" style="font-size: 12px; list-style-type: square; margin-left: 1em; padding-left: 0px;">The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types.</li>
<li class="li" style="font-size: 12px; list-style-type: square; margin-left: 1em; padding-left: 0px;">Methods with the <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">future</samp> annotation cannot take sObjects or objects as arguments.</li>
<li class="li" style="font-size: 12px; list-style-type: square; margin-left: 1em; padding-left: 0px;"><span class="ph"><a href="https://www.blogger.com/blogger.g?blogID=5347379816213770042" id="no_vf_getset_for_future" name="no_vf_getset_for_future" style="color: #333333; text-decoration: underline;"></a>Methods with the <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">future</samp> annotation cannot be used in <span class="ph">Visualforce</span> controllers in either <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">get<var class="keyword varname" style="font-style: italic; font-weight: bold;">MethodName</var></samp> or <samp class="codeph apex_code" style="color: black; font-size: 13px; font-weight: normal;">set<var class="keyword varname" style="font-style: italic; font-weight: bold;">MethodName</var></samp> methods, nor in the constructor.</span></li>
</ul>
<br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Official Salesforce docs: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_future.htm</span></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-85924170311653460612014-03-28T10:49:00.000-07:002014-03-28T10:49:06.558-07:00How can you programatically make users to follow entities (Accounts, Opportunities etc...) in Chatter?<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">By Adding records to the 'EntitySubscription' object. This object is available only through the API.</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">More Info: <span class="Apple-converted-space"> </span></span><a href="http://www.forcetree.com/2012/05/where-is-chatter-follower-information.html" style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" target="_blank">http://www.forcetree.com/2012/05/where-is-chatter-follower-information.html</a></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-66122428538984382642014-03-28T10:48:00.004-07:002014-03-28T10:48:36.979-07:00What are dynamic queries?<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">A dynamic query is a SOQL or SOSL query which can be constructed and executed at runtime. It is the process of constructing the query string consisting of the fields to be retrieved and the WHERE clauses, based upon certain conditions.</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Here is an example of Dynamic SOQL : <span class="Apple-converted-space"> </span></span><a href="http://www.forcetree.com/2011/08/general-query-utility-using-dynamic.html" style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" target="_blank">http://www.forcetree.com/2011/08/general-query-utility-using-dynamic.html<br /></a><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Official Salesforce Notes: </span><a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_soql.htm" style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" target="_blank">http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_soql.htm</a></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-55120135676819350762014-03-28T10:48:00.000-07:002014-03-28T10:48:06.860-07:00What is the difference between a 15 digit and a 18 digit Salesforce ID?<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">A 15 digit Salesforce ID is case sensitive. Ex: <span class="Apple-converted-space"> </span></span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #606060; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">00570000001ZwTi and </span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #606060; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">00570000001ZWTI are different.<br /></span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">A 18 digit Salesforce ID is case in-sensitive. Ex: </span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #606060; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">00570000001ZwTiXYZ and </span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #606060; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">00570000001ZWTIXYZ are same.</span><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: black; display: inline !important; float: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"> </span></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com2tag:blogger.com,1999:blog-5347379816213770042.post-32532183124932038762014-03-28T10:47:00.002-07:002014-03-28T10:47:30.014-07:00What are Apex Governor Limits?<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; display: inline !important; float: none; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Governor limits are runtime limits enforced by the Apex runtime engine. Because Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources. Types of limits that Apex enforces are resources like memory, database resources, number of script statements to avoid infinite loops, and number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.</span></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-38996802560460450962014-03-28T10:46:00.002-07:002014-03-28T10:46:55.401-07:00What is an "upsert" statement? What is it's use?<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; display: inline !important; float: none; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">UPSERT is a DML operation. DML stands for Data Manipulation Language.</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; display: inline !important; float: none; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">When a record is upserted (ex: upsert accountrecord;), the system updates the record if it already exists. Else, the record is inserted.</span><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;" /><span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; display: inline !important; float: none; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">This operation is particularly very helpful when you have a set of records of which a few have to be inserted and others updated. The upsert operation combines both insert and update into one.</span></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-2697612315321069662014-03-28T10:45:00.004-07:002014-03-28T10:45:47.102-07:00What is the use of "With Sharing" keyword? Where is it used?<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span style="font-size: 14px;">Apex code generally runs in the "System" mode meaning that through an Apex Class the current user could get access to records which he would not have access normally through the User Interface.<br /><br />So, to ensure that your Visualforce Pages or whereever you use Apex Classes runs in the current user's context (i.e it fetches only information that the user generally has access through the User Interface) use the "<strong>with sharing</strong>" keyword.<br /><br />"<strong>without sharing</strong>" is the exact opposite of "<strong>with sharing</strong>" and is the default.<br /><br />Source:</span></span><a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_keywords_sharing.htm" style="color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" target="_blank">http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_keywords_sharing.htm<span><span style="background-color: white;"></span></span></a></div>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-73431111676488591022014-03-28T10:44:00.004-07:002014-03-28T10:44:43.388-07:00What is the order of execution when a record is inserted/updated?<div dir="ltr" style="text-align: left;" trbidi="on">
<ol class="ol" style="background-color: white; color: black; font-family: Arial,Helvetica,Verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<li class="li" style="margin-left: 1em; padding-left: 0px;">Loads the original record from the database or initializes the record for an <samp class="codeph apex_code" style="font-size: 13px;"><span class="statement" style="color: #00008c;">upsert</span></samp> statement.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Loads the new record field values from the request and overwrites the old values.<div class="p">
If the request came from a standard UI edit page, <span class="ph">Salesforce</span> runs system validation to check the record for:<ul class="ul">
<li class="li" style="margin-left: 1em; padding-left: 0px;">Compliance with layout-specific rules</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Required values at the layout level and field-definition level</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Valid field formats</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Maximum field length</li>
</ul>
</div>
<span class="ph"><span class="ph">Salesforce</span></span> doesn't perform system validation in this step when the request comes from other sources, such as an <span class="ph">Apex</span> application or a <span class="ph">SOAP API</span> call.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes all <samp class="codeph apex_code" style="font-size: 13px;">before</samp> triggers.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Runs most system validation steps again, such as verifying that all required fields have a non-<samp class="codeph apex_code" style="font-size: 13px;"><span class="keyword" style="color: #00008c;">null</span></samp> value, and runs any user-defined validation rules. The only system validation that <span class="ph">Salesforce</span> doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Saves the record to the database, but doesn't commit yet.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes all <samp class="codeph apex_code" style="font-size: 13px;">after</samp> triggers.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes assignment rules.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes auto-response rules.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes workflow rules.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">If there are workflow field updates, updates the record again.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">If the record was updated with workflow field updates, fires <samp class="codeph apex_code" style="font-size: 13px;">before</samp> and <samp class="codeph apex_code" style="font-size: 13px;">after</samp> triggers one more time (and only one more time), in addition to standard validations. Custom validation rules are not run again.Note<div class="noteBody" style="margin-left: 10px;">
<img align="left" alt="" src="http://www.salesforce.com/us/developer/docs/apexcode/Content/images/help/helpNote_icon.gif" style="border: 0px;" />The <samp class="codeph apex_code" style="font-size: 13px;">before</samp> and <samp class="codeph apex_code" style="font-size: 13px;">after</samp> triggers fire one more time <strong class="ph b">only</strong> if something needs to be updated. If the fields have already been set to a value, the triggers are <strong class="ph b">not</strong> fired again.<br /><br /><br /> </div>
</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes escalation rules.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">If the parent record is updated, and a grand-parent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Grand-parent record goes through save procedure.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes Criteria Based Sharing evaluation.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Commits all DML operations to the database.</li>
<li class="li" style="margin-left: 1em; padding-left: 0px;">Executes post-commit logic, such as sending email.</li>
</ol>
<span style="background-color: white; color: black; display: inline ! important; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Source:</span><a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm" style="background-color: white; color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" target="_blank">http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm</a></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-70745805980437948312014-03-28T10:43:00.004-07:002014-03-28T10:43:45.602-07:00How will you find the distinct values of a particular field in a SObject?<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white;">
<span style="-webkit-text-stroke-width: 0px; background-color: #f8f8f8; color: #222222; font-family: Arial, Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span style="font-size: 14px;">By using the GROUP BY Clause in an SOQL Query. For ex:<br /><br />[Select Status from Case GROUP BY Status] - This will give all the distinct values for the Status field.<br /><br />Source:</span></span><a href="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_groupby.htm" style="color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" target="_blank">http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_groupby.htm</a></div>
</div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0tag:blogger.com,1999:blog-5347379816213770042.post-23657744978401670612014-03-28T10:42:00.000-07:002014-03-28T10:42:31.995-07:00State some best practices to be followed for Apex Triggers.<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="background-color: white; color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<li style="margin-left: 1.5em; padding-left: 0px;">Test your Triggers against bulk records. Your Apex Triggers should always work well for a single record as well as bulk insert/updation.</li>
<li style="margin-left: 1.5em; padding-left: 0px;">Do not have SOQL queries inside a for loop.</li>
<li style="margin-left: 1.5em; padding-left: 0px;">Do not HARDCODE ID's inside your Apex Class</li>
<li style="margin-left: 1.5em; padding-left: 0px;">Use the LIMITS System Class to avoid hitting governor limits by checking whether you have hit a limit.</li>
</ul>
<span style="background-color: white; color: black; display: inline ! important; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Source: <span class="Apple-converted-space"> </span></span><a href="http://wiki.developerforce.com/page/Apex_Code_Best_Practices" style="background-color: white; color: black; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" target="_blank">http://wiki.developerforce.com/page/Apex_Code_Best_Practices</a></div>
Edwin Raymondhttp://www.blogger.com/profile/09379974324475713267noreply@blogger.com0