Governor Limits

Using Limit class in Salesforce

We know that salesforce works on the concept of Multi-Tenancy, because of which there are many governor limits that are in place to use the salesforce server resources smoothly. To check the limitations of in apex class as per specific scenario, we can make use of standard limit class.

The Limits methods return the specific limit for the particular governor, such as

  • the number of calls of a method
  • the amount of heap size remaining.
  • Query Limits
  • Queueable Jobs
  • Number of API calls
  • Limits on DML statements
Continue reading “Using Limit class in Salesforce”
Trailhead

Security.stripInaccessible

When working on DML operation in salesforce from Apex class developer might miss the security permissions that are assigned to different users through profiles, permission sets, sharing rules etc. This can lead to an exception. In this blog we will just see the solution for trailhead module for PD-1 certification. I will cover more details about stripInaccessible feature in a separate blog.

Continue reading “Security.stripInaccessible”
Salesforce Lightning

Calling Apex Method with Parameters from a Lightning Web Component

There will be ample scenarios where a developer must customize things in salesforce to meet the business requirement. Customization in Lightning Web Component (LWC) can be done in multiple ways based on requirement. One is using lightning-record-edit-form and lightning-record-form. With these developers will have very minimal control over the component. Another way is by calling a server-side method. With this, developers will have good control over the component and can achieve complex business requirement. In this blog we will see how we can call a server Apex Method with parameters from an LWC JavaScript(.JS) file.

There are few things to note when you want to call an apex method.

  1. Importing the Server-side method (apex class).
  2. Calling a Server-side method from JS method.
  3. Fetching the value that is returned.
Continue reading “Calling Apex Method with Parameters from a Lightning Web Component”
Governor Limits · Salesforce Basic

Apex Class, Variables, Constructor & Methods in Salesforce.

If you know Java or Dotnet applications, then you may observe that everything is written as a class. There are different access levels. You can also define class within a class just like inner class and outer class etc.

Salesforce also provides similar syntax that is followed in Java. Syntax can be to defining a class or variables in class or a wrapper class everything is similar to the syntax followed in Java programming.

Let us see a class and things that can be done in a class in Salesforce.

public class A_Class_Name{ 

        // Variables
	public static string a_Variable {get;set;}

        // Constructor
	public A_Class_Name(){
	        // Constructor business logic code
        }

        // Methods 
        public void a_Method_Name(Integer a_Variable1, Ingeter a_Variable2){
	        // Business logic code
        }
}
Continue reading “Apex Class, Variables, Constructor & Methods in Salesforce.”