SlideShare une entreprise Scribd logo
1  sur  10
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Apex Trigger in Salesforce
TM
cloud.analogy info@cloudanalogy.com +1(415)830-3899
A trigger is an Apex script that executes before or after certain events occur in DML,
For example, before the object record is entered into the database or after the
record has been deleted. Triggers allow you to carry out custom actions before or
after changes to Salesforce records.
Two types of Apex triggers
Before trigger:
This trigger is used to update or verify the value of a record before it is saved in a
database.
What is a Trigger?
cloud.analogy info@cloudanalogy.com +1(415)830-3899
After trigger:
This trigger is used to access values of the record stored in a database and use this
value to make changes to other records.
Bulky Trigger:
By default, all triggers in Salesforce are bulky triggers. This means you can process
many records simultaneously.
What is a Trigger?
cloud.analogy info@cloudanalogy.com +1(415)830-3899
isExecuting - Returns true if the current context for the Apex code is a trigger, not a
Visualforce page, a Web service.
isInsert - Returns true if this trigger was fired due to an insert operation.
isUpdate - Returns true if this trigger was fired due to an update operation.
isDelete - Returns true if this trigger was fired due to a delete operation.
isBefore - Returns true if this trigger was fired before any record was saved.
isAfter - Returns true if this trigger was fired after all records were saved.
Trigger Context Variables
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Trigger Context Variables
isUndelete - If a record is recovered from the recycle bin it returns trigger true.
new - Returns a list of the new versions of the sObject records
newMap - A map of IDs to the new versions of the sObject records
Old - Returns a list of the old versions of the sObject records.
oldMap - A map of IDs to the old versions of the sObject records.
Size - The total number of records in a trigger invocation.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Workflow
● It is an automated process that can shoot an action that is based on evaluation
and rule criteria.
● Performing DML operations in the workflow is not possible.
● We can obtain a workflow over an object.
● We can’t create a query from the database.
Triggers in Salesforce vs. Workflow
in Salesforce
Triggers in Salesforce vs. Workflow
in Salesforce
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Trigger
● It is a piece of code that is executed either before or after a record is updated
or inserted.
● More than 15 DML operations can be used in a single trigger.
● More than 20 SOQLs can be used from the database in a trigger.
● We can access triggers across an object and related to that object.
Limitations of Workflows overcome by
Triggers in Salesforce
cloud.analogy info@cloudanalogy.com +1(415)830-3899
● Workflows are not able to create or update a separate object.
● You can’t reference certain fields when using workflows.
● You will not have your workflow doing more than just field updates and emails.
cloud.analogy info@cloudanalogy.com +1(415)830-3899
Want to know more about triggers?
Contact our certified Salesforce
Consultants now!
THANK YOU
cloud.analogy info@cloudanalogy.com +1(415)830-3899

Contenu connexe

Tendances

Lwc presentation
Lwc presentationLwc presentation
Lwc presentationNithesh N
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsSalesforce Developers
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #SalesforceAmit Singh
 
Lightning web components
Lightning web components Lightning web components
Lightning web components Cloud Analogy
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Introduction to lightning Web Component
Introduction to lightning Web ComponentIntroduction to lightning Web Component
Introduction to lightning Web ComponentMohith Shrivastava
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
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
 
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 Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Yury Bondarau
 
Salesforce sharing and visibility Part 1
Salesforce sharing and visibility Part 1Salesforce sharing and visibility Part 1
Salesforce sharing and visibility Part 1Ahmed Keshk
 
Salesforce admin training 1
Salesforce admin training 1Salesforce admin training 1
Salesforce admin training 1HungPham381
 

Tendances (20)

Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
SFDC User Setup
SFDC User SetupSFDC User Setup
SFDC User Setup
 
Lwc presentation
Lwc presentationLwc presentation
Lwc presentation
 
Apex collection patterns
Apex collection patternsApex collection patterns
Apex collection patterns
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #Salesforce
 
Lightning web components
Lightning web components Lightning web components
Lightning web components
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Data model in salesforce
Data model in salesforceData model in salesforce
Data model in salesforce
 
Introduction to lightning Web Component
Introduction to lightning Web ComponentIntroduction to lightning Web Component
Introduction to lightning Web Component
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
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
 
Deep Dive into Apex Triggers
Deep Dive into Apex TriggersDeep Dive into Apex Triggers
Deep Dive into Apex Triggers
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security Model
 
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
 
Relationships in Salesforce
Relationships in SalesforceRelationships in Salesforce
Relationships in Salesforce
 
Salesforce sharing and visibility Part 1
Salesforce sharing and visibility Part 1Salesforce sharing and visibility Part 1
Salesforce sharing and visibility Part 1
 
Salesforce admin training 1
Salesforce admin training 1Salesforce admin training 1
Salesforce admin training 1
 

Similaire à Apex Trigger in Salesforce

Workflow Rules in Salesforce vs Process Builder in Salesforce
Workflow Rules in Salesforce vs Process Builder in SalesforceWorkflow Rules in Salesforce vs Process Builder in Salesforce
Workflow Rules in Salesforce vs Process Builder in SalesforceCloud Analogy
 
Introduction to apex
Introduction to apexIntroduction to apex
Introduction to apexRinku Saini
 
Top Salesforce Tips That Help You Boost Productivity
Top Salesforce Tips That Help You Boost ProductivityTop Salesforce Tips That Help You Boost Productivity
Top Salesforce Tips That Help You Boost ProductivityCloud Analogy
 
Ecrire son premier Trigger (et les comprendre)
Ecrire son premier Trigger (et les comprendre)Ecrire son premier Trigger (et les comprendre)
Ecrire son premier Trigger (et les comprendre)Doria Hamelryk
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
 
Introduction to Lightning Testing Service
Introduction to Lightning Testing ServiceIntroduction to Lightning Testing Service
Introduction to Lightning Testing ServiceCloud Analogy
 
What are the tools and techniques for managing Big Data in your Org
What are the tools and techniques for managing Big Data in your OrgWhat are the tools and techniques for managing Big Data in your Org
What are the tools and techniques for managing Big Data in your OrgCloud Analogy
 
Magnify your user experience with lightning flow
Magnify your user experience with lightning flowMagnify your user experience with lightning flow
Magnify your user experience with lightning flowCloud Analogy
 
Magnify your user experience with lightning flow
Magnify your user experience with lightning flowMagnify your user experience with lightning flow
Magnify your user experience with lightning flowNitesh Singh
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cRachelBarker26
 
Lessons Learnt from Running Thousands of On-demand Spark Applications
Lessons Learnt from Running Thousands of On-demand Spark ApplicationsLessons Learnt from Running Thousands of On-demand Spark Applications
Lessons Learnt from Running Thousands of On-demand Spark ApplicationsItai Yaffe
 
36 items to capture for practical hardware asset tracking
36 items to capture for practical hardware asset tracking36 items to capture for practical hardware asset tracking
36 items to capture for practical hardware asset trackingchinkshady
 
Become an Expert in Salesforce Apex Triggers | JanBask Training
 Become an Expert in Salesforce Apex Triggers | JanBask Training Become an Expert in Salesforce Apex Triggers | JanBask Training
Become an Expert in Salesforce Apex Triggers | JanBask TrainingJanBask Training
 
Salesforce® Summer’17 To Raise The Temperature This Season!
Salesforce® Summer’17 To Raise The Temperature This Season!Salesforce® Summer’17 To Raise The Temperature This Season!
Salesforce® Summer’17 To Raise The Temperature This Season!Ajeet Singh
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi Harris
 
How to RightScale-Enable Your Images
How to RightScale-Enable Your ImagesHow to RightScale-Enable Your Images
How to RightScale-Enable Your ImagesRightScale
 
Step by-step-lsmw-tutorial-101208040548-phpapp02
Step by-step-lsmw-tutorial-101208040548-phpapp02Step by-step-lsmw-tutorial-101208040548-phpapp02
Step by-step-lsmw-tutorial-101208040548-phpapp02johnbryan26
 

Similaire à Apex Trigger in Salesforce (20)

Workflow Rules in Salesforce vs Process Builder in Salesforce
Workflow Rules in Salesforce vs Process Builder in SalesforceWorkflow Rules in Salesforce vs Process Builder in Salesforce
Workflow Rules in Salesforce vs Process Builder in Salesforce
 
Introduction to apex
Introduction to apexIntroduction to apex
Introduction to apex
 
Top Salesforce Tips That Help You Boost Productivity
Top Salesforce Tips That Help You Boost ProductivityTop Salesforce Tips That Help You Boost Productivity
Top Salesforce Tips That Help You Boost Productivity
 
Ecrire son premier Trigger (et les comprendre)
Ecrire son premier Trigger (et les comprendre)Ecrire son premier Trigger (et les comprendre)
Ecrire son premier Trigger (et les comprendre)
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Introduction to Lightning Testing Service
Introduction to Lightning Testing ServiceIntroduction to Lightning Testing Service
Introduction to Lightning Testing Service
 
What are the tools and techniques for managing Big Data in your Org
What are the tools and techniques for managing Big Data in your OrgWhat are the tools and techniques for managing Big Data in your Org
What are the tools and techniques for managing Big Data in your Org
 
Magnify your user experience with lightning flow
Magnify your user experience with lightning flowMagnify your user experience with lightning flow
Magnify your user experience with lightning flow
 
Magnify your user experience with lightning flow
Magnify your user experience with lightning flowMagnify your user experience with lightning flow
Magnify your user experience with lightning flow
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
 
Lessons Learnt from Running Thousands of On-demand Spark Applications
Lessons Learnt from Running Thousands of On-demand Spark ApplicationsLessons Learnt from Running Thousands of On-demand Spark Applications
Lessons Learnt from Running Thousands of On-demand Spark Applications
 
36 items to capture for practical hardware asset tracking
36 items to capture for practical hardware asset tracking36 items to capture for practical hardware asset tracking
36 items to capture for practical hardware asset tracking
 
Become an Expert in Salesforce Apex Triggers | JanBask Training
 Become an Expert in Salesforce Apex Triggers | JanBask Training Become an Expert in Salesforce Apex Triggers | JanBask Training
Become an Expert in Salesforce Apex Triggers | JanBask Training
 
Salesforce® Summer’17 To Raise The Temperature This Season!
Salesforce® Summer’17 To Raise The Temperature This Season!Salesforce® Summer’17 To Raise The Temperature This Season!
Salesforce® Summer’17 To Raise The Temperature This Season!
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19
 
How to RightScale-Enable Your Images
How to RightScale-Enable Your ImagesHow to RightScale-Enable Your Images
How to RightScale-Enable Your Images
 
Amazon Redshift Deep Dive
Amazon Redshift Deep Dive Amazon Redshift Deep Dive
Amazon Redshift Deep Dive
 
Large Data Management Strategies
Large Data Management StrategiesLarge Data Management Strategies
Large Data Management Strategies
 
T-SQL & Triggers
T-SQL & TriggersT-SQL & Triggers
T-SQL & Triggers
 
Step by-step-lsmw-tutorial-101208040548-phpapp02
Step by-step-lsmw-tutorial-101208040548-phpapp02Step by-step-lsmw-tutorial-101208040548-phpapp02
Step by-step-lsmw-tutorial-101208040548-phpapp02
 

Plus de Cloud Analogy

Zendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxZendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxCloud Analogy
 
Salesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxSalesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxCloud Analogy
 
Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Cloud Analogy
 
Top 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxTop 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxCloud Analogy
 
SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?Cloud Analogy
 
5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins ProductivityCloud Analogy
 
Tips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMTips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMCloud Analogy
 
5 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 20225 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 2022Cloud Analogy
 
Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Cloud Analogy
 
HubSpot And Slack Integration
HubSpot And Slack IntegrationHubSpot And Slack Integration
HubSpot And Slack IntegrationCloud Analogy
 
Multi-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceMulti-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceCloud Analogy
 
5 Myths About Salesforce CRM
5 Myths About Salesforce CRM5 Myths About Salesforce CRM
5 Myths About Salesforce CRMCloud Analogy
 
6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing SuccessCloud Analogy
 
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceHow Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceCloud Analogy
 
Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Cloud Analogy
 
How To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemHow To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemCloud Analogy
 
Best Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowBest Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowCloud Analogy
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCloud Analogy
 
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your RevenueCloud Analogy
 
How To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamHow To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamCloud Analogy
 

Plus de Cloud Analogy (20)

Zendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxZendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptx
 
Salesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxSalesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptx
 
Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022
 
Top 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxTop 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptx
 
SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?
 
5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity
 
Tips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMTips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRM
 
5 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 20225 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 2022
 
Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022
 
HubSpot And Slack Integration
HubSpot And Slack IntegrationHubSpot And Slack Integration
HubSpot And Slack Integration
 
Multi-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceMulti-Factor Authentication In Salesforce
Multi-Factor Authentication In Salesforce
 
5 Myths About Salesforce CRM
5 Myths About Salesforce CRM5 Myths About Salesforce CRM
5 Myths About Salesforce CRM
 
6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success
 
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceHow Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
 
Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022
 
How To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemHow To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce Ecosystem
 
Best Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowBest Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should Know
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation Challenges
 
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
 
How To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamHow To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales Team
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

Apex Trigger in Salesforce

  • 2. cloud.analogy info@cloudanalogy.com +1(415)830-3899 A trigger is an Apex script that executes before or after certain events occur in DML, For example, before the object record is entered into the database or after the record has been deleted. Triggers allow you to carry out custom actions before or after changes to Salesforce records. Two types of Apex triggers Before trigger: This trigger is used to update or verify the value of a record before it is saved in a database. What is a Trigger?
  • 3. cloud.analogy info@cloudanalogy.com +1(415)830-3899 After trigger: This trigger is used to access values of the record stored in a database and use this value to make changes to other records. Bulky Trigger: By default, all triggers in Salesforce are bulky triggers. This means you can process many records simultaneously. What is a Trigger?
  • 4. cloud.analogy info@cloudanalogy.com +1(415)830-3899 isExecuting - Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service. isInsert - Returns true if this trigger was fired due to an insert operation. isUpdate - Returns true if this trigger was fired due to an update operation. isDelete - Returns true if this trigger was fired due to a delete operation. isBefore - Returns true if this trigger was fired before any record was saved. isAfter - Returns true if this trigger was fired after all records were saved. Trigger Context Variables
  • 5. cloud.analogy info@cloudanalogy.com +1(415)830-3899 Trigger Context Variables isUndelete - If a record is recovered from the recycle bin it returns trigger true. new - Returns a list of the new versions of the sObject records newMap - A map of IDs to the new versions of the sObject records Old - Returns a list of the old versions of the sObject records. oldMap - A map of IDs to the old versions of the sObject records. Size - The total number of records in a trigger invocation.
  • 6. cloud.analogy info@cloudanalogy.com +1(415)830-3899 Workflow ● It is an automated process that can shoot an action that is based on evaluation and rule criteria. ● Performing DML operations in the workflow is not possible. ● We can obtain a workflow over an object. ● We can’t create a query from the database. Triggers in Salesforce vs. Workflow in Salesforce
  • 7. Triggers in Salesforce vs. Workflow in Salesforce cloud.analogy info@cloudanalogy.com +1(415)830-3899 Trigger ● It is a piece of code that is executed either before or after a record is updated or inserted. ● More than 15 DML operations can be used in a single trigger. ● More than 20 SOQLs can be used from the database in a trigger. ● We can access triggers across an object and related to that object.
  • 8. Limitations of Workflows overcome by Triggers in Salesforce cloud.analogy info@cloudanalogy.com +1(415)830-3899 ● Workflows are not able to create or update a separate object. ● You can’t reference certain fields when using workflows. ● You will not have your workflow doing more than just field updates and emails.
  • 9. cloud.analogy info@cloudanalogy.com +1(415)830-3899 Want to know more about triggers? Contact our certified Salesforce Consultants now!