Tag: Apex

salesforce email service

salesforce email service

salesforce email service Salesforce Email service is automated process that use Apex class to process inbound email. When we set up an email service, we need to generate a special email address in which salesforce will receive your emails. We also need to create one apex class to implement Messaging.InboundEmailHandler interface . The email services …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/salesforce-email-service/

System.NullPointerException: Attempt to de-reference a null object

System.NullPointerException: Attempt to de-reference a null object How to solve System.NullPointerException: Attempt to de-reference a null object error System.NullPointerException: Attempt to de-reference a null object is very common error in apex class.  It occurs when your variable (sobject, list, set or any other data type) is not initialized (allocated memory). In order to use the non primitive data type …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/system-nullpointerexception-attempt-to-de-reference-a-null-object/

Using apex:repeat in Visualforce Page

Using apex:repeat in Visualforce Page Using apex:repeat in Visualforce Page apex:repeat is an iteration component that allows you to output the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items. Note that if used within an <apex:pageBlockSection> or <apex:panelGrid> component, all content generated by a …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/using-apexrepeat-in-visualforce-page/

Salesforce Governor Limits

Salesforce Governor Limits What is Salesforce Governor Limits? What are governor limits in salesforce? Salesforce Governor Limits or governor limits in salesforce Apex runtime engine strictly enforces limits to ensure that runaway Apex code or processes don’t monopolize shared resources. Why Salesforce has Governor Limits? Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/salesforce-governor-limits/

apex random number Salesforce

apex random number Salesforce apex random number Salesforce Many time we have requirement to generate random number in Apex. It can be achieved using Math.random() function. This method return a positive Double that is greater than or equal to 0.0 and less than 1.0. This method only returns number between 0.0 and 1.0. Now its important …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/apex-random-number-salesforce/

Trigger context variables in salesforce

Trigger context variables in salesforce What are Trigger context variables in salesforce? All triggers define implicit variables that allow developers to access run-time context. These variables are contained in the System.Trigger class. Following are the context variable available in triggers. Please note variable availability in trigger varies according to the type of trigger events. List of …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/trigger-context-variables-in-salesforce/

Salesforce Interview Questions on Triggers

Salesforce Interview Questions on Triggers In this post I am going to share Salesforce Interview Questions on Triggers What is a Trigger? Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions. Just like database systems support triggers, Apex provides trigger support for …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/salesforce-interview-questions-on-triggers/

TestSetUp method in apex test classes

TestSetUp method in apex test classes Test classes are an important part of overall SDLC in Salesforce. We as a developer have to write the test classes very often, and we need to create the test data as well, to have our test class executed successfully. We’ll cover a new concept introduced in salesforce test classes …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/testsetup-method-in-apex-test-classes/

Compare old and new field values in trigger

Compare old and new field values in trigger Salesforce Sometimes we have requirement that our trigger should run only when some field value is changed on a record. So we need to compare value of that field between old version of record and new version of record to make sure that trigger will not run every …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/compare-old-and-new-field-values-in-trigger/

Test class in salesforce with example

Test class in Salesforce with example Test class in salesforce Testing is an important part of SDLC. So, before deploying our code to production environment, Salesforce requires at least 75% of your code to be covered by our test classes whic. Salesforce has done that to make sure that our code doesn’t break in any situation …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/test-class-with-example-salesforce/