Upto 20% Scholarship on Live Online Classes

- Technology Blogs -

An Introduction to Apex Class in Salesforce for Beginners

Introduction to Apex class:-

Salesforce has already provided prebuilt application such as workflow, approval process, process builder etc for the CRM functionality. It may be possible that the Organization has much more complex business requirements which cannot achieve by current prebuilt applications. When it happensthe Force.com platforms has following ways for developer to build custom functionality.

We Can use Apex for Web Services, Email Services, Provide solution for  Complex business requirements which cannot  fulfilled by workflow rule. Add custom logic to another operation such as saving record.

How to Write Basics Access modifier:-

Salesforce Training
  1. Private:- method and variable only we can access in the defining apex class
  2. Public:- method and variable of an apex class we can access from another apex class as well.
  3. Protected:- method and variable can be access by any inner classes in the same Apex class, and those classes that extend the defining Apex class. You can only use this access modifier for instance methods and member variables.
  4. Global :- method and variable can be access from any apex class in the organization or from any other organization.

Static and Instant Method:-

Apex code:-

  1. How to get list of records using apex class

Ans:-

Public class listofAccountRecordClass
{
Public list<account>getAccountList(){

List<account>accountList = [select id,name,phone,industry,rating from account];
If(!accountList.isEmpty()){
	returnaccountList;
}
System.debug(‘accountList’+accountList);
return new list<Account>();
}
}

An Introduction to Apex Class in Salesforce for Beginners

An Introduction to Apex Class in Salesforce for Beginners

GO TO ANONYMOUS WINDOW.

Read:   What is Assignment Rules? How to Create Assignment Rules in Salesforce?

An Introduction to Apex Class in Salesforce for Beginners

Call the class.

An Introduction to Apex Class in Salesforce for Beginners

An Introduction to Apex Class in Salesforce for Beginners

 

James

James

I am James, the Salesfroce Instructor with JanBask training, I write articles on latest Salesforce trends and updates to help everyone out there to be updated on the latest Salesforce trends.



Write a Comment

avatar
  Subscribe  
Notify of

Trending

Top 30 Core Java Interview Questions and Answers for Fresher, Experienced Developer
Top 30 Manual Testing Interview Questions & Answers for Fresher
What Is Trigger In Salesforce?
Top 20 AWS Interview Question and Answers For Fresher, Experienced Developer
Different Types of SQL Server & SQL Database Functions

Related Posts

How Online Training is Better Than In-Person Training?
Salesforce CRM vs. SAP CRM- Which One is Better?
How to Improve Coding Skills & Become Better Salesforce Developer?
Salesforce Service Cloud Certification Study Guide For Beginner
How To Pass All Salesforce Admin Certification Exams?