SlideShare a Scribd company logo
1 of 38
SALESFORCE
DEVELOPMENT
- MOUSUMI CHATTERJEE
- NAVEEN DHANARAJ
Agenda
• Introduction
• Apex
• Architecture of Apex
• Collections
• List
• Set
• map
• Query
• SOQL
• SOSL
• Test class
• Visualforce Pages
• Architecture of visualforce pages
Introduction:
Salesforce.com is Sales(CRM) and Service
applications which were developed and
running on the Force.com Platform.
Force.com is a platform where you can
develop your own application
APEX
What is Apex?
• Strongly Typed object oriented programming
language and running on Force.com Platform.
• Apex is Easy to use, Multitenant Environment,
Upgrades Automatically, Easy Testing, Versioned,
Integrated.
• Apex allows developement of business logics to
get executed system events including button
click related record updates and vf pages.
Why we use APEX?
• When we have complex business processes that
are unsupported by the existing functionality.
• When this is the case, the Force.com platform
includes a number of ways for advanced
administrators and developers to implement
custom functionality.
• These include Apex, Visualforce, and the SOAP
API.
Architecture of APEX
Datatype
1.Primitive - Basically found in any other
programming language eg. Boolean, decimal
double , ID (any Id in salesforce .com).
2. sObjects - It refer to Salesforce object .
Datatype very specific to Salesforce. It
represents a row of data.
3.Collections:
sObject
• Account a= new Account(name=“Dw",Type="Customer-Type"
, Industry="Technology");
sObject
• Account a= new Account(name=“Dw",Type="Customer-Type"
, Industry="Technology");
• Account a = new Account( Select name, type, Industry
where name="Dazeworks Technologies);
sObject
Contact c= [Select email from Contact where
name = “Dazeworks"]
String e = c.email;
if(e == null)
delete c;
If Email is not there then record with contact
name will be deleted.
Writing APEX Class
Setup  Build  Develop  Apex Class  New
COLLECTION
Collections
• Collection work somewhat like array, except their
size can change dynamically.
• Collection is an object that can hold reference of
other object or sObject.
• Collection are more advanced in behavior and
have easy access methods .
Types of Collection
•LIST
•SET
•MAP
They are collections used in
APEX.
LIST
• <List> is a collection of records which is
an ordered collection.
• <List> can contain duplicate values.
Example
List<String> animal= new List<String>("pig",
"earthworm", "chimpanzee",
"panda");
• pig--0
• earthworm--1
• chimpanzee -2
• panda ---3
String first_animal =animals.get(0);
It will return pig
SET
• Set is a collection of unique, unordered
primitive datatypes or sobjects.
• Set does not contain duplicate values.
Example
Set<Integer> s = new set<Integer>();
s.add(1); //adds an element to the set
System.asserts(s.contains(1)); // Asserts that
the set contains an element
s.remove(1); removes an element
MAP
• MAP is a collection of key-pair values.
• The key is unique and can be of any data-
type like String , sObjects. Pair-values can
have duplicate values.
SOQL Query
• Salesforce Object Query Language(SOQL) is
a query-only language , similar to SQL .
• It uses relationship for navigating data.
• This is main language used for data retrieval
of a single sObjects.
SOQL Query
SOSL Query
• Salesforce Object Search Language(SOSL)
is a simple language for searching all
multiple persisted objects simultaneously.
• A SOSL Query begins with the required FIND
clause
SOSL Query
Difference B/w SOQL and SOSL
SOQL SOSL
Retrieves the records from the
database by using “SELECT” keyword.
Retrieves the records from the
database by using the “FIND” keyword.
Using SOQL we can know in Which
objects or fields the data resides.
Using SOSL, we don’t know in which
object or field the data resides.
We can retrieve data from single
object or from multiple objects that
are related to each other.
We can retrieve multiple objects and
field values efficiently when the
objects may or may not be related to
each other
We can Query on only one object. We can query on multiple objects.
Total number of records retrieved by
SOQL queries is 50,000
Total number of records retrieved by a
single SOSL query is 2000
TEST CLASS
APEX Unit Test
• There must be 75% test coverage to be able to
deploy apex code to your production organization.
• Testing is key to ensuring the quality of any
application
• Salesforce executes Apex Unit Tests of all
organization to ensure quality and that no existing
behaviour has been altered for customers.
APEX Unit Test
Below is the test class for the APEX Example shown
Best Practice for Test Class
• Test class must start with @isTest annotation.
• To deploy to production at-least 75% code
coverage is required.
• System.debug statement are not counted as a part
of apex code limit.
• Test method should static and no void return type.
• Test method and test classes are not counted as a
part of code limit.
Visualforce Page
Visualforce Page
• Visualforce is a framework that allows
developers to build sophisticated, custom
user interfaces that can be hosted natively
on the Force.com platform.
• Maximum response size for
a Visualforce page is less than 15Mb.
• Maximum file size for a file uploaded using
a Visualforce page is 10Mb.
When to use Visualforce?
Visualforce page is a tag based mark-up
language to develop customised user
interface in Salesforce.
Visualforce Architecture
Writing Visualforce Page
Language style: Tag Mark-up
Page override model: Assemble standard and custom components using
Tags.
Performance
Required technical
Skills:
HTML , XML , Bootstrap
Interaction with Apex Direct, by binding to a custom controller
Example
Example contd…
Tags in Visualforce Page
Tags : Used for :
<apex:page/> Calls an action when the page is loaded.
<apex:Form/> Creates a BUTTON that calls an action .
<apex:pageBlock/> Creates a LINK that calls an action .
<apex:pageblocksection
/>
Create a section within page block.
<apex:inputfield/> HTML input element for a value to a field on a
Salesforce object.
<apex:outputfield/> A read-only display of a label and value for a field on a
Salesforce object
Governor Limits
• Apex runs in a multitenant environment, the Apex
run time engine strictly enforces a number of
limits to ensure that runaway Apex does not
monopolize shared resources.
Description Limits
Total number of SOQL queries issued 100
Total number of SOSL queries issued 20
Total number of DML statements issued 150
Total heap size 6MB
Total heap size for Batch Apex and future
methods
12MB
Maximum size of a Visualforce email
template
1MB
Total number of records retrieved by a
single SOSL query
200
THANK YOU

More Related Content

What's hot

Episode 6 - DML, Transaction and Error handling in Salesforce
Episode 6 - DML, Transaction and Error handling in SalesforceEpisode 6 - DML, Transaction and Error handling in Salesforce
Episode 6 - DML, Transaction and Error handling in SalesforceJitendra Zaa
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewDhanik Sahni
 
Apex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasApex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasSalesforce Developers
 
Batch Apex in Salesforce
Batch Apex in SalesforceBatch Apex in Salesforce
Batch Apex in SalesforceDavid Helgerson
 
Salesforce Developer Console ppt
Salesforce Developer Console  pptSalesforce Developer Console  ppt
Salesforce Developer Console pptKuhinoor Alom
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetupMuleSoft Meetup
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UITech OneStop
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce PresentationChetna Purohit
 
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...Edureka!
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceJitendra Zaa
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelSalesforce Developers
 
Salesforce Lightning Process builder
Salesforce Lightning Process builderSalesforce Lightning Process builder
Salesforce Lightning Process builderThinqloud
 
Bi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertBi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertFeras Ahmad
 

What's hot (20)

Episode 6 - DML, Transaction and Error handling in Salesforce
Episode 6 - DML, Transaction and Error handling in SalesforceEpisode 6 - DML, Transaction and Error handling in Salesforce
Episode 6 - DML, Transaction and Error handling in Salesforce
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
 
Apex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasApex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and Canvas
 
SOQL & SOSL for Admins
SOQL & SOSL for AdminsSOQL & SOSL for Admins
SOQL & SOSL for Admins
 
SFDC Batch Apex
SFDC Batch ApexSFDC Batch Apex
SFDC Batch Apex
 
Batch Apex in Salesforce
Batch Apex in SalesforceBatch Apex in Salesforce
Batch Apex in Salesforce
 
Asynchronous apex
Asynchronous apexAsynchronous apex
Asynchronous apex
 
Salesforce Developer Console ppt
Salesforce Developer Console  pptSalesforce Developer Console  ppt
Salesforce Developer Console ppt
 
Data model in salesforce
Data model in salesforceData model in salesforce
Data model in salesforce
 
Top Benefits of Salesforce in Business
Top Benefits of Salesforce in BusinessTop Benefits of Salesforce in Business
Top Benefits of Salesforce in Business
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce Presentation
 
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in Salesforce
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security Model
 
Salesforce Lightning Process builder
Salesforce Lightning Process builderSalesforce Lightning Process builder
Salesforce Lightning Process builder
 
Governor limits
Governor limitsGovernor limits
Governor limits
 
Bi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertBi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion Alert
 

Similar to Salesforce Basic Development

Ladies Be Architects - Apex Basics
Ladies Be Architects - Apex BasicsLadies Be Architects - Apex Basics
Ladies Be Architects - Apex Basicsgemziebeth
 
Coding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce PagesCoding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce PagesChristopher Lewis
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginnershrakhra
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Salesforce winter 16 release
Salesforce winter 16 releaseSalesforce winter 16 release
Salesforce winter 16 releaseJitendra Zaa
 
Visualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 PlatformVisualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 Platformsg8002
 
AWS Summit London 2014 | Deployment Done Right (300)
AWS Summit London 2014 | Deployment Done Right (300)AWS Summit London 2014 | Deployment Done Right (300)
AWS Summit London 2014 | Deployment Done Right (300)Amazon Web Services
 
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16Alfredo Abate
 
Flex 4.5 jeyasekar
Flex 4.5  jeyasekarFlex 4.5  jeyasekar
Flex 4.5 jeyasekarjeya soft
 
Publishing Data to REST APIs with Lightning Process Builder
Publishing Data to REST APIs with Lightning Process BuilderPublishing Data to REST APIs with Lightning Process Builder
Publishing Data to REST APIs with Lightning Process BuilderScott Coleman
 
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Salesforce Developers
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data AnalyticsAmazon Web Services
 
Introduction to apex
Introduction to apexIntroduction to apex
Introduction to apexRinku Saini
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAsad Abbas
 
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptx
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptxMastering-Salesforce-Development-A-Comprehensive-Overview (1).pptx
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptxAnupama Kate
 

Similar to Salesforce Basic Development (20)

Ladies Be Architects - Apex Basics
Ladies Be Architects - Apex BasicsLadies Be Architects - Apex Basics
Ladies Be Architects - Apex Basics
 
Coding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce PagesCoding the Salesforce User Interface with Visualforce Pages
Coding the Salesforce User Interface with Visualforce Pages
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginners
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Salesforce winter 16 release
Salesforce winter 16 releaseSalesforce winter 16 release
Salesforce winter 16 release
 
Visualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 PlatformVisualforce for the Salesforce1 Platform
Visualforce for the Salesforce1 Platform
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
AWS Summit London 2014 | Deployment Done Right (300)
AWS Summit London 2014 | Deployment Done Right (300)AWS Summit London 2014 | Deployment Done Right (300)
AWS Summit London 2014 | Deployment Done Right (300)
 
Amazon Redshift Deep Dive
Amazon Redshift Deep Dive Amazon Redshift Deep Dive
Amazon Redshift Deep Dive
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16
Extending_EBS_12_1_3_with_APEX_5_0_COLLABORATE16
 
Flex 4.5 jeyasekar
Flex 4.5  jeyasekarFlex 4.5  jeyasekar
Flex 4.5 jeyasekar
 
Publishing Data to REST APIs with Lightning Process Builder
Publishing Data to REST APIs with Lightning Process BuilderPublishing Data to REST APIs with Lightning Process Builder
Publishing Data to REST APIs with Lightning Process Builder
 
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
 
Introduction to apex
Introduction to apexIntroduction to apex
Introduction to apex
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using Lucene
 
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptx
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptxMastering-Salesforce-Development-A-Comprehensive-Overview (1).pptx
Mastering-Salesforce-Development-A-Comprehensive-Overview (1).pptx
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
AWS glue technical enablement training
AWS glue technical enablement trainingAWS glue technical enablement training
AWS glue technical enablement training
 

Recently uploaded

定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 

Recently uploaded (20)

定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 

Salesforce Basic Development

  • 2. Agenda • Introduction • Apex • Architecture of Apex • Collections • List • Set • map • Query • SOQL • SOSL • Test class • Visualforce Pages • Architecture of visualforce pages
  • 3. Introduction: Salesforce.com is Sales(CRM) and Service applications which were developed and running on the Force.com Platform. Force.com is a platform where you can develop your own application
  • 4. APEX What is Apex? • Strongly Typed object oriented programming language and running on Force.com Platform. • Apex is Easy to use, Multitenant Environment, Upgrades Automatically, Easy Testing, Versioned, Integrated. • Apex allows developement of business logics to get executed system events including button click related record updates and vf pages.
  • 5. Why we use APEX? • When we have complex business processes that are unsupported by the existing functionality. • When this is the case, the Force.com platform includes a number of ways for advanced administrators and developers to implement custom functionality. • These include Apex, Visualforce, and the SOAP API.
  • 7. Datatype 1.Primitive - Basically found in any other programming language eg. Boolean, decimal double , ID (any Id in salesforce .com). 2. sObjects - It refer to Salesforce object . Datatype very specific to Salesforce. It represents a row of data. 3.Collections:
  • 8. sObject • Account a= new Account(name=“Dw",Type="Customer-Type" , Industry="Technology");
  • 9. sObject • Account a= new Account(name=“Dw",Type="Customer-Type" , Industry="Technology"); • Account a = new Account( Select name, type, Industry where name="Dazeworks Technologies);
  • 10. sObject Contact c= [Select email from Contact where name = “Dazeworks"] String e = c.email; if(e == null) delete c; If Email is not there then record with contact name will be deleted.
  • 11. Writing APEX Class Setup  Build  Develop  Apex Class  New
  • 13. Collections • Collection work somewhat like array, except their size can change dynamically. • Collection is an object that can hold reference of other object or sObject. • Collection are more advanced in behavior and have easy access methods .
  • 14. Types of Collection •LIST •SET •MAP They are collections used in APEX.
  • 15. LIST • <List> is a collection of records which is an ordered collection. • <List> can contain duplicate values.
  • 16. Example List<String> animal= new List<String>("pig", "earthworm", "chimpanzee", "panda"); • pig--0 • earthworm--1 • chimpanzee -2 • panda ---3 String first_animal =animals.get(0); It will return pig
  • 17. SET • Set is a collection of unique, unordered primitive datatypes or sobjects. • Set does not contain duplicate values.
  • 18. Example Set<Integer> s = new set<Integer>(); s.add(1); //adds an element to the set System.asserts(s.contains(1)); // Asserts that the set contains an element s.remove(1); removes an element
  • 19. MAP • MAP is a collection of key-pair values. • The key is unique and can be of any data- type like String , sObjects. Pair-values can have duplicate values.
  • 20. SOQL Query • Salesforce Object Query Language(SOQL) is a query-only language , similar to SQL . • It uses relationship for navigating data. • This is main language used for data retrieval of a single sObjects.
  • 22. SOSL Query • Salesforce Object Search Language(SOSL) is a simple language for searching all multiple persisted objects simultaneously. • A SOSL Query begins with the required FIND clause
  • 24. Difference B/w SOQL and SOSL SOQL SOSL Retrieves the records from the database by using “SELECT” keyword. Retrieves the records from the database by using the “FIND” keyword. Using SOQL we can know in Which objects or fields the data resides. Using SOSL, we don’t know in which object or field the data resides. We can retrieve data from single object or from multiple objects that are related to each other. We can retrieve multiple objects and field values efficiently when the objects may or may not be related to each other We can Query on only one object. We can query on multiple objects. Total number of records retrieved by SOQL queries is 50,000 Total number of records retrieved by a single SOSL query is 2000
  • 26. APEX Unit Test • There must be 75% test coverage to be able to deploy apex code to your production organization. • Testing is key to ensuring the quality of any application • Salesforce executes Apex Unit Tests of all organization to ensure quality and that no existing behaviour has been altered for customers.
  • 27. APEX Unit Test Below is the test class for the APEX Example shown
  • 28. Best Practice for Test Class • Test class must start with @isTest annotation. • To deploy to production at-least 75% code coverage is required. • System.debug statement are not counted as a part of apex code limit. • Test method should static and no void return type. • Test method and test classes are not counted as a part of code limit.
  • 30. Visualforce Page • Visualforce is a framework that allows developers to build sophisticated, custom user interfaces that can be hosted natively on the Force.com platform. • Maximum response size for a Visualforce page is less than 15Mb. • Maximum file size for a file uploaded using a Visualforce page is 10Mb.
  • 31. When to use Visualforce? Visualforce page is a tag based mark-up language to develop customised user interface in Salesforce.
  • 33. Writing Visualforce Page Language style: Tag Mark-up Page override model: Assemble standard and custom components using Tags. Performance Required technical Skills: HTML , XML , Bootstrap Interaction with Apex Direct, by binding to a custom controller
  • 36. Tags in Visualforce Page Tags : Used for : <apex:page/> Calls an action when the page is loaded. <apex:Form/> Creates a BUTTON that calls an action . <apex:pageBlock/> Creates a LINK that calls an action . <apex:pageblocksection /> Create a section within page block. <apex:inputfield/> HTML input element for a value to a field on a Salesforce object. <apex:outputfield/> A read-only display of a label and value for a field on a Salesforce object
  • 37. Governor Limits • Apex runs in a multitenant environment, the Apex run time engine strictly enforces a number of limits to ensure that runaway Apex does not monopolize shared resources. Description Limits Total number of SOQL queries issued 100 Total number of SOSL queries issued 20 Total number of DML statements issued 150 Total heap size 6MB Total heap size for Batch Apex and future methods 12MB Maximum size of a Visualforce email template 1MB Total number of records retrieved by a single SOSL query 200