SlideShare a Scribd company logo
Rinku Saini
When Developer writes and save code in platform , Which is
compiled on force.com platform and store in the form of
metadata in the salesforce server. End users can send request
from UI and retrieve result from salesforce server.
Working of Apex-
Apex Code: Logic-as-a-Service
 What is it?
 What can it do?
 How do I use it?
 Well, let’s see it!
Introducing Apex
 Force.com allows many customizations through User
Interface
 Force.com API allows developers to write client-side
programs or integrations for more flexibility in their
applications
 Client side programs have performance costs
 Lack transactional control across API requests
 Cost and complexity of client hosting server code
 APEX was introduced to address those issues and to
revolutionize the way developers create on-demand
applications.
Apex Code Is
 Strongly-typed, object-based programming language
 Enables developers to execute logic and transaction
control statements on Force.com
 Runs natively on the server
 Code executes on the server when initiated by User
Interface via Buttons & Events, and data through the
API
 Java or C#-like syntax
 Transactional
How is Apex Different?
 Executes directly on the Force.com
 Eliminates network traffic between client application and
Force.com
 Apex Code tightly integrated to the rest of the platform
functionality
 Changes to the metadata referenced in Apex Code will
cause an automatic recompilation the next time those
components are executed
Language Basics
Data Types – Primitive
- String
- Boolean
- Date and DateTime
- Integer, Long, Double
- ID (Force.com database record identifier)
- Blob (for storing binary data)
- Sobject (object representing a Force.com standard or custom
object)
Example:
DateTime dt = System.now() + 1;
Boolean isClosed = true;
String sCapsFirstName = ‘Andrew’.toUpperCase();
Account acct = new Account(); //Sobject example
Language Basics (cont)
Data Types – Collections
Lists - A list can contain duplicate elements.
Sets - A Set is a Collection that cannot contain duplicate elements
Maps – A Map is a pair of key and value.
Arrays - fixed-size sequential collection of elements of the same
type.
Example:
List<Integer> myList = new List<Integer>();
myList.add(12); //Add the number 12 to the list
myList.get(0); //Access to first integer stored in the List
Force.com Query Languages
 SOQL – Salesforce object Query Language
String myName = ‘Acme’;
Account[] accts = [SELECT ID FROM Account WHERE name =:myName] //Pass in a variable
 SOSL – Salesforce object Search Language
List<List<SObject>> searchList = [FIND '415' IN PHONE FIELDS RETURNING Account, Contact ];
Account [] accounts = ((List<Account>)searchList[0]);
Contact [] contacts = ((List<Contact>)searchList[1]);
Data Manipulation with Apex
 DML (Data Manipulation Language)
- Insert
- Update
- Upsert - Operation to create a new or update existing record
based on an external id.
- Delete
- Undelete
Apex Triggers-
 Syntex of writing trigger-
trigger TriggerName on ObjectName (trigger_events) {
code_block
}
 Rules to write trigger-
 It starts with the keyword trigger.
 A unique trigger name to differentiate it from the other triggers.
 Multiple trigger can be defined on the same database object.
 You must name the database object on which to create the trigger.
 You can create trigger on custom and standard objects.
 A comma separated list of one or more trigger events that cause the trigger code to be
executed.
 A event is specified using two keywords 1st one is either before or after. These
indicate that the trigger is going to be executed before or after the database operation
is saved.
 The 2nd keyword is the DML operation - insert, update, delete or undelete.
Apex Class-
 Defination- Class is the collection of data member and
member method.
 Syntex of Class-
 Public class CustomClass{
 Public CustomClass(){} //constructor
 }
 Access Specifiers-
 Private
 Protected
 Public
 global
Difference between Class And Triggers
 Class-
 An Apex class is a template or blueprint from which Apex objects
are created.
 Classes consist of other classes, user-defined methods, variables,
exception types.
 Triggers-
 A trigger is Apex code that executes before or after specific data
manipulation language (DML) events occur, such as before object
records are inserted into the database, or after records have been
deleted.
 A trigger is associated with a standard or custom object and can call
methods of Apex classes
VisualForce -MVC
MVC Meaning-
 Model - includes the custom and standard objects.
 View - is defined by VF pages.
 Visualforce Page - are the salesforce created pages. That is
a markup language.
 Controller - includes the standard,custom, extension
classes.
 That are also known as - Standard controller, custom
controller and extension controller.
Thank You!!

More Related Content

What's hot

SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
llangit
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
llangit
 
Understanding C# in .NET
Understanding C# in .NETUnderstanding C# in .NET
Understanding C# in .NET
mentorrbuddy
 
ASP.NET Session 11 12
ASP.NET Session 11 12ASP.NET Session 11 12
ASP.NET Session 11 12
Sisir Ghosh
 
Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)
Mohamed Saleh
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
Shivanand Arur
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
David McCarter
 
NHibernate
NHibernateNHibernate
NHibernate
gabrielcerutti
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
David Truxall
 
Ado.net
Ado.netAdo.net
Ado.net
dina1985vlr
 
Easy Dataweave transformations - Ashutosh
Easy Dataweave transformations - AshutoshEasy Dataweave transformations - Ashutosh
Easy Dataweave transformations - Ashutosh
StrawhatLuffy11
 
Ef code first
Ef code firstEf code first
Ef code first
ZealousysDev
 
Introduction To NHibernate
Introduction To NHibernateIntroduction To NHibernate
Introduction To NHibernate
Emad Alashi
 
Dataweave nagarjuna
Dataweave nagarjunaDataweave nagarjuna
Dataweave nagarjuna
Nagarjuna reddy
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
Doncho Minkov
 
Linq in C# 3.0: An Overview
Linq in C# 3.0: An OverviewLinq in C# 3.0: An Overview
Linq in C# 3.0: An Overview
pradeepkothiyal
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
Randy Connolly
 
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
Achmad Solichin
 
Annotation Sniffer Hotspots implementation
Annotation Sniffer Hotspots implementationAnnotation Sniffer Hotspots implementation
Annotation Sniffer Hotspots implementation
Hélio Costa e Silva
 

What's hot (19)

SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
 
Understanding C# in .NET
Understanding C# in .NETUnderstanding C# in .NET
Understanding C# in .NET
 
ASP.NET Session 11 12
ASP.NET Session 11 12ASP.NET Session 11 12
ASP.NET Session 11 12
 
Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
NHibernate
NHibernateNHibernate
NHibernate
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
Ado.net
Ado.netAdo.net
Ado.net
 
Easy Dataweave transformations - Ashutosh
Easy Dataweave transformations - AshutoshEasy Dataweave transformations - Ashutosh
Easy Dataweave transformations - Ashutosh
 
Ef code first
Ef code firstEf code first
Ef code first
 
Introduction To NHibernate
Introduction To NHibernateIntroduction To NHibernate
Introduction To NHibernate
 
Dataweave nagarjuna
Dataweave nagarjunaDataweave nagarjuna
Dataweave nagarjuna
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 
Linq in C# 3.0: An Overview
Linq in C# 3.0: An OverviewLinq in C# 3.0: An Overview
Linq in C# 3.0: An Overview
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
 
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
 
Annotation Sniffer Hotspots implementation
Annotation Sniffer Hotspots implementationAnnotation Sniffer Hotspots implementation
Annotation Sniffer Hotspots implementation
 

Viewers also liked

Apex institutions
Apex institutionsApex institutions
Apex institutions
Bikramjit Singh
 
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
Getting value from IoT, Integration and Data Analytics
 
Affordable Workflow Options for APEX
Affordable Workflow Options for APEXAffordable Workflow Options for APEX
Affordable Workflow Options for APEX
Niels de Bruijn
 
Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2) Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2)
Salesforce Developers
 
Apex and design pattern
Apex and design patternApex and design pattern
Apex and design pattern
Rosario Renga
 
SFDC - Step by Step Reference Guide
SFDC - Step by Step Reference GuideSFDC - Step by Step Reference Guide
SFDC - Step by Step Reference Guide
Kelsea Kiene
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginners
hrakhra
 
Introduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas WeiseIntroduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas Weise
Big Data Spain
 
Resource mobilization
Resource mobilizationResource mobilization
Resource mobilization
Deepti Nambiar
 
How to use source control with apex?
How to use source control with apex?How to use source control with apex?
How to use source control with apex?
Oliver Lemm
 
Funds Mobilization
Funds MobilizationFunds Mobilization
Funds Mobilization
Daily 10 Minutes
 
Process builder vs Triggers
Process builder vs TriggersProcess builder vs Triggers
Process builder vs Triggers
ProQuest
 

Viewers also liked (12)

Apex institutions
Apex institutionsApex institutions
Apex institutions
 
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
Oracle Day 2014 - Mobile Customer Case - PROMIS Lite, or How Oracle MAF mobil...
 
Affordable Workflow Options for APEX
Affordable Workflow Options for APEXAffordable Workflow Options for APEX
Affordable Workflow Options for APEX
 
Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2) Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2)
 
Apex and design pattern
Apex and design patternApex and design pattern
Apex and design pattern
 
SFDC - Step by Step Reference Guide
SFDC - Step by Step Reference GuideSFDC - Step by Step Reference Guide
SFDC - Step by Step Reference Guide
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginners
 
Introduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas WeiseIntroduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas Weise
 
Resource mobilization
Resource mobilizationResource mobilization
Resource mobilization
 
How to use source control with apex?
How to use source control with apex?How to use source control with apex?
How to use source control with apex?
 
Funds Mobilization
Funds MobilizationFunds Mobilization
Funds Mobilization
 
Process builder vs Triggers
Process builder vs TriggersProcess builder vs Triggers
Process builder vs Triggers
 

Similar to Introduction to apex

Salesforce
SalesforceSalesforce
Salesforce
maheswara reddy
 
SetFocus Portfolio
SetFocus PortfolioSetFocus Portfolio
SetFocus Portfolio
Frank Stepanski
 
Development withforce
Development withforceDevelopment withforce
Development withforce
adm_exoplatform
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg framework
Yousuf Roushan
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19
Preethi Harris
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
EdwinOstos
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
Rich Helton
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfolio
mwillmer
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Ty bca-sem-v-introduction to vb.net-i-uploaded
Ty bca-sem-v-introduction to vb.net-i-uploadedTy bca-sem-v-introduction to vb.net-i-uploaded
Ty bca-sem-v-introduction to vb.net-i-uploaded
Prachi Sasankar
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
Salesforce Basic Development
Salesforce Basic DevelopmentSalesforce Basic Development
Salesforce Basic Development
Naveen Dhanaraj
 
unit 3.docx
unit 3.docxunit 3.docx
unit 3.docx
Sadhana Sreekanth
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0
Raju Permandla
 
Entity framework1
Entity framework1Entity framework1
Entity framework1
Girish Gowda
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
brendonschwartz
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)
Sayed Ahmed
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plus
Sayed Ahmed
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP Injection
Chema Alonso
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
Abhishek Sur
 

Similar to Introduction to apex (20)

Salesforce
SalesforceSalesforce
Salesforce
 
SetFocus Portfolio
SetFocus PortfolioSetFocus Portfolio
SetFocus Portfolio
 
Development withforce
Development withforceDevelopment withforce
Development withforce
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg framework
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfolio
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Ty bca-sem-v-introduction to vb.net-i-uploaded
Ty bca-sem-v-introduction to vb.net-i-uploadedTy bca-sem-v-introduction to vb.net-i-uploaded
Ty bca-sem-v-introduction to vb.net-i-uploaded
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
 
Salesforce Basic Development
Salesforce Basic DevelopmentSalesforce Basic Development
Salesforce Basic Development
 
unit 3.docx
unit 3.docxunit 3.docx
unit 3.docx
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0
 
Entity framework1
Entity framework1Entity framework1
Entity framework1
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plus
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP Injection
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 

Recently uploaded

Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 

Introduction to apex

  • 2. When Developer writes and save code in platform , Which is compiled on force.com platform and store in the form of metadata in the salesforce server. End users can send request from UI and retrieve result from salesforce server. Working of Apex-
  • 3. Apex Code: Logic-as-a-Service  What is it?  What can it do?  How do I use it?  Well, let’s see it!
  • 4. Introducing Apex  Force.com allows many customizations through User Interface  Force.com API allows developers to write client-side programs or integrations for more flexibility in their applications  Client side programs have performance costs  Lack transactional control across API requests  Cost and complexity of client hosting server code  APEX was introduced to address those issues and to revolutionize the way developers create on-demand applications.
  • 5. Apex Code Is  Strongly-typed, object-based programming language  Enables developers to execute logic and transaction control statements on Force.com  Runs natively on the server  Code executes on the server when initiated by User Interface via Buttons & Events, and data through the API  Java or C#-like syntax  Transactional
  • 6. How is Apex Different?  Executes directly on the Force.com  Eliminates network traffic between client application and Force.com  Apex Code tightly integrated to the rest of the platform functionality  Changes to the metadata referenced in Apex Code will cause an automatic recompilation the next time those components are executed
  • 7. Language Basics Data Types – Primitive - String - Boolean - Date and DateTime - Integer, Long, Double - ID (Force.com database record identifier) - Blob (for storing binary data) - Sobject (object representing a Force.com standard or custom object) Example: DateTime dt = System.now() + 1; Boolean isClosed = true; String sCapsFirstName = ‘Andrew’.toUpperCase(); Account acct = new Account(); //Sobject example
  • 8. Language Basics (cont) Data Types – Collections Lists - A list can contain duplicate elements. Sets - A Set is a Collection that cannot contain duplicate elements Maps – A Map is a pair of key and value. Arrays - fixed-size sequential collection of elements of the same type. Example: List<Integer> myList = new List<Integer>(); myList.add(12); //Add the number 12 to the list myList.get(0); //Access to first integer stored in the List
  • 9. Force.com Query Languages  SOQL – Salesforce object Query Language String myName = ‘Acme’; Account[] accts = [SELECT ID FROM Account WHERE name =:myName] //Pass in a variable  SOSL – Salesforce object Search Language List<List<SObject>> searchList = [FIND '415' IN PHONE FIELDS RETURNING Account, Contact ]; Account [] accounts = ((List<Account>)searchList[0]); Contact [] contacts = ((List<Contact>)searchList[1]);
  • 10. Data Manipulation with Apex  DML (Data Manipulation Language) - Insert - Update - Upsert - Operation to create a new or update existing record based on an external id. - Delete - Undelete
  • 11. Apex Triggers-  Syntex of writing trigger- trigger TriggerName on ObjectName (trigger_events) { code_block }  Rules to write trigger-  It starts with the keyword trigger.  A unique trigger name to differentiate it from the other triggers.  Multiple trigger can be defined on the same database object.  You must name the database object on which to create the trigger.  You can create trigger on custom and standard objects.  A comma separated list of one or more trigger events that cause the trigger code to be executed.  A event is specified using two keywords 1st one is either before or after. These indicate that the trigger is going to be executed before or after the database operation is saved.  The 2nd keyword is the DML operation - insert, update, delete or undelete.
  • 12. Apex Class-  Defination- Class is the collection of data member and member method.  Syntex of Class-  Public class CustomClass{  Public CustomClass(){} //constructor  }  Access Specifiers-  Private  Protected  Public  global
  • 13. Difference between Class And Triggers  Class-  An Apex class is a template or blueprint from which Apex objects are created.  Classes consist of other classes, user-defined methods, variables, exception types.  Triggers-  A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted.  A trigger is associated with a standard or custom object and can call methods of Apex classes
  • 15. MVC Meaning-  Model - includes the custom and standard objects.  View - is defined by VF pages.  Visualforce Page - are the salesforce created pages. That is a markup language.  Controller - includes the standard,custom, extension classes.  That are also known as - Standard controller, custom controller and extension controller.