SlideShare a Scribd company logo
Path to Code
Begin Your Salesforce Coding Adventure
Episode 1
Basics, Data Types, Naming Convention
Sr Technical Architect
Salesforce MVP
23 Salesforce Certifications
Jitendra Zaa
Agenda
• Why we need code
• Developer Console
• Naming Conventions
• Data Types
• Collections
• Pass by Value and Pass by Reference
• Trailhead Modules
• Q&A
Some House Rules
• Mute your mic
• Keep adding questions in Zoom Q&A Window
• No question is too small
• Questions will be answered in last 15 mins
Why to learn Code
With great power comes great responsibility
Best Practices
• Write as little code as possible in Salesforce
• Code always used as a last option
• Salesforce has a rich toolset for configuration which is tested,
maintained, and upgraded
• Workflow rules, Process Builder, Approval Process, Visual Flow,
Validation rules, page layouts, and Record types are few alternatives
to customization
How to start
• Create a free Salesforce developer account here
• Start writing code in Developer Console
Developer Console
Where code is written
Variables
• Think of it as Box which holds data
• You must declare a variable before using it
NameData Type Value
Value
countInteger 10=
eNameString ‘John’=
Data Types
• Primitive Data Types
• Collections
• Enums
• Objects (parent of All Objects)
• sObject (Standard or Custom Object)
Primitive Data Types
• Boolean (True, False)
• DateTime (1-2-2019 8:00pm EST)
• Date (1-2-2019)
• Decimal (3.142)
• Double : 64 bit (3.142)
• ID (18 digit Salesforce Id)
• Integer (32 bit number)
• Long (64 bit number)
• Object (parent data type of everything )
• String
• Time
Bonus – When to use Enum ?
• If you want to have restrictive data with limited option then use
enum
• Just like picklist / dropdown you can choose any invalid data
accidently
Public ENUM Season {Summer, Winter, Spring}
Naming Convention
Camel Case
• Word in middle is Capital
• Used for method naming
• Example – iPhone, eBay, seasonName
Pascal Case or Upper Camel Case
• First letter and middle word starts with capital letter
• Companies like Microsoft encourages this
• It’s also known as Upper Camel Case
• Class names should be Pascal Case
• Example - AccountTriggerHandler
Hungarian Notation
• One of the mostly used naming convention
• Variable name indicates intention or Kind
• Example – lstAccount, setContact, mapAccountAddress
Collections
• List
• Map
• Set
List / Array
80 10 80 21 34 55 67 76 2 89
0 1 2 3 4 5 6 7 8 9
Values
Index
Set
80 10 80 21 34 55 67 76 2 89Unique Values
Map
Unique Key Value
1 One
2 Two
3 Three
4 Value
Pass by Value vs Pass by
Reference
Pass By Value
a=10
function
a=10
a=20
Copy of a passed to
method
Value changed in copy and actual
variable still has same value
Pass By Value
• All primitive data types like Integer, Double, Decimal, etc are Pass by
Value
Example
Pass By Reference
a=10
function
a=10
a=20
Copy of a passed to
method
Value changed everywhere
a=20
Pass By Reference
• Any object or Complex Data Type are pass by Reference
• Hint – Mostly Variable initialized using ‘new’ keyword is pass by
Reference
• sObject, object, or classes are Pass by Reference
Example
Resources
• Set Methods
• Primitive Data Types
• List Methods
• Map Methods
• Hungarian Notation
Trailhead Modules
Platform Development Basics Apex Basics & Database Developer Console Basics
Q & A
Thank You
Subscribe
Decimal vs Double
• You can set scale (number of digit to right of decimal) in Decimal but
not in Double
• Decimal has more methods compared to Double
• Currency field is by default Decimal
• Double does not support scientific (e) notation
• Double is 64 bit

More Related Content

What's hot

Episode 18 - Asynchronous Apex
Episode 18 - Asynchronous ApexEpisode 18 - Asynchronous Apex
Episode 18 - Asynchronous Apex
Jitendra Zaa
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for Salesforce
Jitendra Zaa
 
Episode 9 - Building soap integrations in salesforce
Episode 9 - Building soap integrations  in salesforceEpisode 9 - Building soap integrations  in salesforce
Episode 9 - Building soap integrations in salesforce
Jitendra Zaa
 
Episode 17 - Handling Events in Lightning Web Component
Episode 17 - Handling Events in Lightning Web ComponentEpisode 17 - Handling Events in Lightning Web Component
Episode 17 - Handling Events in Lightning Web Component
Jitendra Zaa
 
Episode 16 - Introduction to LWC
Episode 16 - Introduction to LWCEpisode 16 - Introduction to LWC
Episode 16 - Introduction to LWC
Jitendra Zaa
 
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulersEpisode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Jitendra Zaa
 
Episode 15 - Basics of Javascript
Episode 15 - Basics of JavascriptEpisode 15 - Basics of Javascript
Episode 15 - Basics of Javascript
Jitendra Zaa
 
Episode 24 - Live Q&A for getting started with Salesforce
Episode 24 - Live Q&A for getting started with SalesforceEpisode 24 - Live Q&A for getting started with Salesforce
Episode 24 - Live Q&A for getting started with Salesforce
Jitendra Zaa
 
Improving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin WilliamsImproving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin Williams
QA or the Highway
 
Test Automation
Test AutomationTest Automation
Test Automation
99pillar
 
Episode 11 building & exposing rest api in salesforce v1.0
Episode 11   building & exposing rest api in salesforce v1.0Episode 11   building & exposing rest api in salesforce v1.0
Episode 11 building & exposing rest api in salesforce v1.0
Jitendra Zaa
 
Unit testing
Unit testingUnit testing
Unit testing
Adam Birr
 
Agile korea 2013 유석문
Agile korea 2013 유석문Agile korea 2013 유석문
Agile korea 2013 유석문Sangcheol Hwang
 
Performance Tuning with Execution Plans
Performance Tuning with Execution PlansPerformance Tuning with Execution Plans
Performance Tuning with Execution Plans
Grant Fritchey
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatling
Tim van Eijndhoven
 
Apex Flex Queue: Batch Apex Liberated
Apex Flex Queue: Batch Apex LiberatedApex Flex Queue: Batch Apex Liberated
Apex Flex Queue: Batch Apex Liberated
CarolEnLaNube
 
Quest for the ultimate autotest coverage
Quest for the ultimate autotest coverageQuest for the ultimate autotest coverage
Quest for the ultimate autotest coverage
Alexander Pushkarev
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
NetStronghold
 
Code quality
Code qualityCode quality
Code quality
44ue
 
Don’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleaguesDon’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleagues
Izzet Mustafaiev
 

What's hot (20)

Episode 18 - Asynchronous Apex
Episode 18 - Asynchronous ApexEpisode 18 - Asynchronous Apex
Episode 18 - Asynchronous Apex
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for Salesforce
 
Episode 9 - Building soap integrations in salesforce
Episode 9 - Building soap integrations  in salesforceEpisode 9 - Building soap integrations  in salesforce
Episode 9 - Building soap integrations in salesforce
 
Episode 17 - Handling Events in Lightning Web Component
Episode 17 - Handling Events in Lightning Web ComponentEpisode 17 - Handling Events in Lightning Web Component
Episode 17 - Handling Events in Lightning Web Component
 
Episode 16 - Introduction to LWC
Episode 16 - Introduction to LWCEpisode 16 - Introduction to LWC
Episode 16 - Introduction to LWC
 
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulersEpisode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulers
 
Episode 15 - Basics of Javascript
Episode 15 - Basics of JavascriptEpisode 15 - Basics of Javascript
Episode 15 - Basics of Javascript
 
Episode 24 - Live Q&A for getting started with Salesforce
Episode 24 - Live Q&A for getting started with SalesforceEpisode 24 - Live Q&A for getting started with Salesforce
Episode 24 - Live Q&A for getting started with Salesforce
 
Improving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin WilliamsImproving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin Williams
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Episode 11 building & exposing rest api in salesforce v1.0
Episode 11   building & exposing rest api in salesforce v1.0Episode 11   building & exposing rest api in salesforce v1.0
Episode 11 building & exposing rest api in salesforce v1.0
 
Unit testing
Unit testingUnit testing
Unit testing
 
Agile korea 2013 유석문
Agile korea 2013 유석문Agile korea 2013 유석문
Agile korea 2013 유석문
 
Performance Tuning with Execution Plans
Performance Tuning with Execution PlansPerformance Tuning with Execution Plans
Performance Tuning with Execution Plans
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatling
 
Apex Flex Queue: Batch Apex Liberated
Apex Flex Queue: Batch Apex LiberatedApex Flex Queue: Batch Apex Liberated
Apex Flex Queue: Batch Apex Liberated
 
Quest for the ultimate autotest coverage
Quest for the ultimate autotest coverageQuest for the ultimate autotest coverage
Quest for the ultimate autotest coverage
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
 
Code quality
Code qualityCode quality
Code quality
 
Don’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleaguesDon’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleagues
 

Similar to Episode 1 - PathToCode.com

Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Vivek Chawla
 
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can UseFive Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Salesforce Developers
 
Coming Clean on Records at Tirana JUG
Coming Clean on Records at Tirana JUGComing Clean on Records at Tirana JUG
Coming Clean on Records at Tirana JUG
Albin Hasani
 
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Fausto Capellan Jr
 
Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)
Shirish Bari
 
Salesforce online training -GoLogica
Salesforce online training -GoLogicaSalesforce online training -GoLogica
Salesforce online training -GoLogica
GoLogica Technologies
 
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
Johann Schleier-Smith
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
karthik kumar
 
CSC111-Chap_02.pdf
CSC111-Chap_02.pdfCSC111-Chap_02.pdf
CSC111-Chap_02.pdf
2b75fd3051
 
Build a modern data platform.pptx
Build a modern data platform.pptxBuild a modern data platform.pptx
Build a modern data platform.pptx
Ike Ellis
 
codingtechniques1.ppt
codingtechniques1.pptcodingtechniques1.ppt
codingtechniques1.ppt
azida3
 
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuireEmbracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
Databricks
 
TestGuild and QuerySurge Presentation -DevOps for Data Testing
TestGuild and QuerySurge Presentation -DevOps for Data TestingTestGuild and QuerySurge Presentation -DevOps for Data Testing
TestGuild and QuerySurge Presentation -DevOps for Data Testing
RTTS
 
Correlate Log Data with Business Metrics Like a Jedi
Correlate Log Data with Business Metrics Like a JediCorrelate Log Data with Business Metrics Like a Jedi
Correlate Log Data with Business Metrics Like a Jedi
Trevor Parsons
 
Coding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part ICoding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part I
Salesforce Developers
 
In-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and RevolutionIn-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and Revolution
Revolution Analytics
 
[Azure Governance] Lesson 1 : Azure Naming Convention
[Azure Governance] Lesson 1 : Azure Naming Convention[Azure Governance] Lesson 1 : Azure Naming Convention
[Azure Governance] Lesson 1 : Azure Naming Convention
☁ Hicham KADIRI ☁
 
Sales force
Sales forceSales force
Sales force
Raj Kumar Ranabhat
 
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
Amazon Web Services
 

Similar to Episode 1 - PathToCode.com (20)

Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
 
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can UseFive Enterprise Development Best Practices That EVERY Salesforce Org Can Use
Five Enterprise Development Best Practices That EVERY Salesforce Org Can Use
 
Coming Clean on Records at Tirana JUG
Coming Clean on Records at Tirana JUGComing Clean on Records at Tirana JUG
Coming Clean on Records at Tirana JUG
 
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
 
Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)
 
Salesforce online training -GoLogica
Salesforce online training -GoLogicaSalesforce online training -GoLogica
Salesforce online training -GoLogica
 
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
ReStream: Accelerating Backtesting and Stream Replay with Serial-Equivalent P...
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
 
Informatica overview
Informatica overviewInformatica overview
Informatica overview
 
CSC111-Chap_02.pdf
CSC111-Chap_02.pdfCSC111-Chap_02.pdf
CSC111-Chap_02.pdf
 
Build a modern data platform.pptx
Build a modern data platform.pptxBuild a modern data platform.pptx
Build a modern data platform.pptx
 
codingtechniques1.ppt
codingtechniques1.pptcodingtechniques1.ppt
codingtechniques1.ppt
 
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuireEmbracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
Embracing a Taxonomy of Types to Simplify Machine Learning with Leah McGuire
 
TestGuild and QuerySurge Presentation -DevOps for Data Testing
TestGuild and QuerySurge Presentation -DevOps for Data TestingTestGuild and QuerySurge Presentation -DevOps for Data Testing
TestGuild and QuerySurge Presentation -DevOps for Data Testing
 
Correlate Log Data with Business Metrics Like a Jedi
Correlate Log Data with Business Metrics Like a JediCorrelate Log Data with Business Metrics Like a Jedi
Correlate Log Data with Business Metrics Like a Jedi
 
Coding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part ICoding Apps in the Cloud with Force.com - Part I
Coding Apps in the Cloud with Force.com - Part I
 
In-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and RevolutionIn-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and Revolution
 
[Azure Governance] Lesson 1 : Azure Naming Convention
[Azure Governance] Lesson 1 : Azure Naming Convention[Azure Governance] Lesson 1 : Azure Naming Convention
[Azure Governance] Lesson 1 : Azure Naming Convention
 
Sales force
Sales forceSales force
Sales force
 
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
 

More from Jitendra Zaa

Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in Salesforce
Jitendra Zaa
 
Introduction to mulesoft - Alpharetta Developer Group Meet
Introduction to mulesoft - Alpharetta Developer Group MeetIntroduction to mulesoft - Alpharetta Developer Group Meet
Introduction to mulesoft - Alpharetta Developer Group Meet
Jitendra Zaa
 
Episode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceEpisode 10 - External Services in Salesforce
Episode 10 - External Services in Salesforce
Jitendra Zaa
 
South East Dreamin 2019
South East Dreamin 2019South East Dreamin 2019
South East Dreamin 2019
Jitendra Zaa
 
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Episode 8  - Path To Code - Integrate Salesforce with external system using R...Episode 8  - Path To Code - Integrate Salesforce with external system using R...
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Jitendra Zaa
 
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
Jitendra Zaa
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
Jitendra Zaa
 
Episode 4 - Introduction to SOQL in Salesforce
Episode 4  - Introduction to SOQL in SalesforceEpisode 4  - Introduction to SOQL in Salesforce
Episode 4 - Introduction to SOQL in Salesforce
Jitendra Zaa
 
Build sfdx plugin in 15 minutes
Build sfdx plugin in 15 minutesBuild sfdx plugin in 15 minutes
Build sfdx plugin in 15 minutes
Jitendra Zaa
 
Salesforce Org lifecycle management : empowering admins
Salesforce Org lifecycle management : empowering adminsSalesforce Org lifecycle management : empowering admins
Salesforce Org lifecycle management : empowering admins
Jitendra Zaa
 
Salesforce Lightning Data Service
Salesforce Lightning Data ServiceSalesforce Lightning Data Service
Salesforce Lightning Data Service
Jitendra Zaa
 
Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017
Jitendra Zaa
 
Salesforce winter 16 release
Salesforce winter 16 releaseSalesforce winter 16 release
Salesforce winter 16 release
Jitendra Zaa
 

More from Jitendra Zaa (13)

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 mulesoft - Alpharetta Developer Group Meet
Introduction to mulesoft - Alpharetta Developer Group MeetIntroduction to mulesoft - Alpharetta Developer Group Meet
Introduction to mulesoft - Alpharetta Developer Group Meet
 
Episode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceEpisode 10 - External Services in Salesforce
Episode 10 - External Services in Salesforce
 
South East Dreamin 2019
South East Dreamin 2019South East Dreamin 2019
South East Dreamin 2019
 
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
Episode 8  - Path To Code - Integrate Salesforce with external system using R...Episode 8  - Path To Code - Integrate Salesforce with external system using R...
Episode 8 - Path To Code - Integrate Salesforce with external system using R...
 
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
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
 
Episode 4 - Introduction to SOQL in Salesforce
Episode 4  - Introduction to SOQL in SalesforceEpisode 4  - Introduction to SOQL in Salesforce
Episode 4 - Introduction to SOQL in Salesforce
 
Build sfdx plugin in 15 minutes
Build sfdx plugin in 15 minutesBuild sfdx plugin in 15 minutes
Build sfdx plugin in 15 minutes
 
Salesforce Org lifecycle management : empowering admins
Salesforce Org lifecycle management : empowering adminsSalesforce Org lifecycle management : empowering admins
Salesforce Org lifecycle management : empowering admins
 
Salesforce Lightning Data Service
Salesforce Lightning Data ServiceSalesforce Lightning Data Service
Salesforce Lightning Data Service
 
Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017
 
Salesforce winter 16 release
Salesforce winter 16 releaseSalesforce winter 16 release
Salesforce winter 16 release
 

Recently uploaded

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 

Recently uploaded (20)

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 

Episode 1 - PathToCode.com

  • 1. Path to Code Begin Your Salesforce Coding Adventure
  • 2. Episode 1 Basics, Data Types, Naming Convention
  • 3. Sr Technical Architect Salesforce MVP 23 Salesforce Certifications Jitendra Zaa
  • 4. Agenda • Why we need code • Developer Console • Naming Conventions • Data Types • Collections • Pass by Value and Pass by Reference • Trailhead Modules • Q&A
  • 5. Some House Rules • Mute your mic • Keep adding questions in Zoom Q&A Window • No question is too small • Questions will be answered in last 15 mins
  • 7. With great power comes great responsibility
  • 8. Best Practices • Write as little code as possible in Salesforce • Code always used as a last option • Salesforce has a rich toolset for configuration which is tested, maintained, and upgraded • Workflow rules, Process Builder, Approval Process, Visual Flow, Validation rules, page layouts, and Record types are few alternatives to customization
  • 9. How to start • Create a free Salesforce developer account here • Start writing code in Developer Console
  • 11. Variables • Think of it as Box which holds data • You must declare a variable before using it NameData Type Value Value countInteger 10= eNameString ‘John’=
  • 12. Data Types • Primitive Data Types • Collections • Enums • Objects (parent of All Objects) • sObject (Standard or Custom Object)
  • 13. Primitive Data Types • Boolean (True, False) • DateTime (1-2-2019 8:00pm EST) • Date (1-2-2019) • Decimal (3.142) • Double : 64 bit (3.142) • ID (18 digit Salesforce Id) • Integer (32 bit number) • Long (64 bit number) • Object (parent data type of everything ) • String • Time
  • 14. Bonus – When to use Enum ? • If you want to have restrictive data with limited option then use enum • Just like picklist / dropdown you can choose any invalid data accidently Public ENUM Season {Summer, Winter, Spring}
  • 16. Camel Case • Word in middle is Capital • Used for method naming • Example – iPhone, eBay, seasonName
  • 17. Pascal Case or Upper Camel Case • First letter and middle word starts with capital letter • Companies like Microsoft encourages this • It’s also known as Upper Camel Case • Class names should be Pascal Case • Example - AccountTriggerHandler
  • 18. Hungarian Notation • One of the mostly used naming convention • Variable name indicates intention or Kind • Example – lstAccount, setContact, mapAccountAddress
  • 20. List / Array 80 10 80 21 34 55 67 76 2 89 0 1 2 3 4 5 6 7 8 9 Values Index
  • 21. Set 80 10 80 21 34 55 67 76 2 89Unique Values
  • 22. Map Unique Key Value 1 One 2 Two 3 Three 4 Value
  • 23. Pass by Value vs Pass by Reference
  • 24. Pass By Value a=10 function a=10 a=20 Copy of a passed to method Value changed in copy and actual variable still has same value
  • 25. Pass By Value • All primitive data types like Integer, Double, Decimal, etc are Pass by Value
  • 27. Pass By Reference a=10 function a=10 a=20 Copy of a passed to method Value changed everywhere a=20
  • 28. Pass By Reference • Any object or Complex Data Type are pass by Reference • Hint – Mostly Variable initialized using ‘new’ keyword is pass by Reference • sObject, object, or classes are Pass by Reference
  • 30. Resources • Set Methods • Primitive Data Types • List Methods • Map Methods • Hungarian Notation
  • 31. Trailhead Modules Platform Development Basics Apex Basics & Database Developer Console Basics
  • 32. Q & A
  • 35. Decimal vs Double • You can set scale (number of digit to right of decimal) in Decimal but not in Double • Decimal has more methods compared to Double • Currency field is by default Decimal • Double does not support scientific (e) notation • Double is 64 bit