Force.com Platform Fundamentals: Apex Classes

Ashish KothariSalesforce, Technical Tips1 Comment

Force.com Platform Fundamentals: Apex Classes

Apex Classes: An apex class is a blueprint from which Objects are created Classes consist of attributes and methods Classes may contain other classes, known as inner classes (one level deep nested classes) Static attributes and methods can only be declared in a top-level class definition Exception class must be extended in case you want to create new extension classes Classes can be enabled or disabled for different profiles   Syntax: private | public | global [virtual | abstract | with sharing | without sharing | (none)] Class className [implements interfaceName | (none)] [extends classOrInterfaceName | (none)] { // Class … Read More

Force.com Platform Fundamentals: Apex Data Types

Ashish KothariSalesforce, Technical TipsLeave a Comment

Force.com Platform Fundamentals: Apex Data Types

Apex Data Types include: Primitive Enum sObject Collection   Primitive Data Types: Include the following: Boolean Date Date/Time Time ID Integer Long Double Decimal String Blob Object   Enum Data Types Is an abstract data type that allows you to store the values of a finite set of identifiers Defined using the keyword ‘enum’ Built-in enums viz. System.StatusCode returns API error codes Some enum methods: Values() – returns a list of values for the enum Name() – returns the name of the enum   sObject Data Types Represents Objects (Standard and Custom) in Salesforce.com Can be either strongly typed or … Read More

Force.com Platform Fundamentals: Apex

Ashish KothariOfferings, Salesforce, Technical TipsLeave a Comment

Force.com Platform Fundamentals: Apex

What is Apex? Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com​ API. Using syntax that looks like Java and acts like database stored procedures, Apex enables developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages. Apex code can be initiated by Web service requests and from triggers on objects. Apex vs. Java They are both similar in syntax and notation, strongly typed and transactional. Both support OOP features viz. Encapsulation, Inheritance, Polymorphism. Apex runs in a Multi-Tenanted environment and is limited by … Read More