Overview of Apex

Apex is a proprietary, object-oriented programming language provided by Salesforce.com. It is used to build custom solutions on the Salesforce platform, including custom objects, fields, business logic, and integration with other systems. Apex is similar to Java in terms of syntax and structure, making it accessible to developers with a Java background.

Apex allows developers to interact with the Salesforce database, manipulate data, and trigger actions based on specific conditions. It is a powerful tool for extending the functionality of Salesforce and building custom applications tailored to the needs of an organization.

Apex code can be written directly in the Salesforce platform, and it runs natively on the Salesforce servers, providing a scalable and secure execution environment. With Apex, developers can access the full power of the Salesforce platform, including its data model, security model, and user interface.

Overall, Apex is a crucial tool for Salesforce developers who want to build custom applications and extend the capabilities of the Salesforce platform.

Apex works on ORM:-

ORM–> Object Relationship and Mapping

Custom Object: Customers

|

—>1.Table:Customer__c

2.Tab (User Interface):Customers

3.Bussiness Logic (Class) : Customer__c

step 1: ORM transform each salesforce object in the form of a ‘Class’ where object and class Name should be similar.

    Ex.

        1.Account object will be transformed as a class ‘Account’.

	public class Account{
	  // class member..
	}
	

       
2.
Lead object will be represented in the form of ‘Lead’ class.

      public class Lead{
        // class member..
      }
	

       

3.Position__c object will be represented in the form of ‘Position__c’ class.

      public class Position__c{
		// class member..
	  }
	

step 2:Each field inside the object will be represented in the form of variable inside the class.

    Ex.
       
1.
Position__c fields will be represented in the form of variable inside the class.

public class Position__c
{
	public string Name;
	Public DateTime created by ,lastmodifiedby;
    	public ID ownerid;
    	public Curreny Minimum_Pay__c,Maximum_Pay__c;
}
	

       
2.
Account fields will be represented in the form of variable inside the class.

public class Account
{
   public string Name,rating ,industry ,fax,phone,website,active__c,customerPriority__c;
   Public DateTime created by ,lastmodifiedby;
   public ID ownerid;
   public Curreny Minimum_Pay__c,Maximum_Pay__c;
}
	

There are following 10 Methods :
    1.Save()
    2.QuickSave()
    3.cancel()
    4.Delete()
    5.First()
    6.Last()
    7.Next()
    8.Previous()
    9.HasPrevious()
    10.HasNext()

Leave a Reply

Your email address will not be published. Required fields are marked *