SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
Salesforce Interview Preparation Toolkit
Formula and Validation Rules in SalesForce CRM

Description:
BISP is committed to provide BEST learning material to the beginners and advance learners.
In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for
SalesForce. The document focuses on some common interview questions related to Formulas
and Validation Rules. Join our professional training program and learn from experts.

History:
Version Description Change
0.1
Initial Draft
0.1
Review#1

www.bispsolutions.com

Author
Chandra Prakash Sharma
Amit Sharma

www.bisptrainigs.com

Publish Date
10th Apr 2013
10th Apr 2013

www.hyperionguru.com

Page 1
Question : 1
SAP_Account_Id__c and Navison_Account_Id__c are two Text fields, Sell_to__c and Ship_to__c
are two checkboxes. The rule should ensure that a record which has either SAP_Account_Id__c or
Navison_Account_Id__c filled in (or both), can be saved only if either Sell_to__c and Ship_to__c (or
both) are checked.
Solution :

Go to Setup > Create > Objects > Select object name(Ex: Sap Account), then go to down select
Validation rule Click on New button, you can see below.

Then write here validation rule you can see below.

Note : If you need Both check box check use this Validation.

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 2
OR( ISBLANK( SAP_Account_Id__c ) , ISBLANK( Navison_Account_Id__c ) ,IF( Sell_to__c =
false, true ,false) ,IF( ship_to__c = false, true ,false) )

Question : 2
Create a validation rule that when My_Check__c is unchecked, the TextField1__c and
TextField2__c should have no values.
Solution :

Below is validation Rule ..

Code :
OR(My_Check__c== FALSE ,
(OR( ISBLANK( TextField1__c ) , ISBLANK( TextField2__c ) ) ) )

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 3
Question 3 :
Validation rule for currency with 2 decimal values
Example : Valid: 12.00, 12.10, 12.01, 12.56
Not Valid: 12, 12.1, 12.0,12.203
Solution :

NOT(REGEX(Price__c,"[0-9]+[.]{1}[0-9]{2}"))

Question 4 :
I need to apply to formula to the field which depends on some other field. I created a picklist field
which contains BOX, Class-A, Class-B, Class-C. If anyone selected BOX in that picklist field then
automatically Ticket fare has to reflect as 100,if they selected Class-A then 75 has to reflect and so
on.
Solution :

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 4
Code :
IF(ISPICKVAL( Seats_Category__c, 'Box'),"100",IF(ISPICKVAL(Seats_Category__c, 'ClassA'),"75",IF(ISPICKVAL(Seats_Category__c, 'ClassB'),"50",IF(ISPICKVAL(Seats_Category__c,'Class-C'),"25","0"))))
Result :

Question 5: Compare 2 checkboxes to complete a text field.
Need to compare the contents of 2 checkbox fields. If they both are checked, I want the new field to
display "Digital and Physical".
If the digital checkbox field is checked, but the physical one is not, then I want to display "Digital
Only".
If the physical checkbox field is checked but the digital one is not, then I want to display "Physical
Only".
If neither fields are checked, then I want to display "Neither".
Solution :

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 5
Validation Rule :

Code :
IF( AND( Channel_Digital_Distribution__c == False, Channel_Physical_Fulfillment__c == False) ,
"Neither", IF( AND( Channel_Digital_Distribution__c == True , Channel_Physical_Fulfillment__c ==
True) , "Digital and Physical", IF( Channel_Physical_Fulfillment__c == True , "Physical Only",
IF(Channel_Digital_Distribution__c == True , " Digital Only" , "False") ) ) )

Question 6 : Calculate Case Age excluding weekends.
Create one formula field (returns number) which will calculate Case Age (In days) such that it will
keep incrementing until case is closed. If the case is closed it will stop counting. This excludes
weekends.
Solution :

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 6
Formula :

Question 7 : validation rules to validate email address format.
Since it is a text field, there is possibility that user will enter wrong email address for e.g.:
abc2ht.com (missing '@'). is there any validation formula rule that can validate email address format
can share here.?
Solution :

Code :
www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 7
NOT(REGEX( Email_Id__c ,"[a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z]{2,4}"))

Question 8 : Limit number of selections from multi-select picklist.
There a way to restrict users to only picking 3 selections from a multi-select picklist that contains 20
options.?
Solution 8 :

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 8
Code :
IF(INCLUDES(Multi_Picklist__c, "A"),1,0) +
IF(INCLUDES( Multi_Picklist__c, "B"),1,0) +
IF(INCLUDES( Multi_Picklist__c, "C"),1,0) +
IF(INCLUDES( Multi_Picklist__c, "D"),1,0) +
IF(INCLUDES( Multi_Picklist__c, "E"),1,0) > 3

Question 9 : Text field allows [a-z][A-Z] and space bar only.
I have created one custom text(Text01__c) field. This field allows characters [a-z][A-Z] and space
bar only. Any formula or validation rule or workflow rule. It not allows numeric's [0-9] and special
character.
Solution :
NOT(REGEX(Text01__c, "([a-zA-Z ])*"))

Question 10 : Validation Rule Help Please.
Trying to create an error when an opportunity stage is dead that you have to pick a reason why
from a picklist. That part I got... now trying to limit it to 2 departments which is another picklist.
Solution :

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 9
Question 11 : Number of days between Event and CloseDate.
We want to know how many days it takes from visiting the customer until the opportunity is closed.
We use events only for these visits, so every account only has one event. What I need to do is to
copy the date of this event either to an opportunity or account to add another custom field to
calculate the days between start date (I already cloned this field in the event to use it in formulas)
and close date.
Another problem is, that CloseDate is only Date and not DateTime like my cloned StartDate. Any
chance to calculate it anyway.?
Solution : Here Apex Trigger Code.

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 10
Apex Class : Here you can write apex test class.

Question 12 : Last modified date workflow rule.
Created a custom field on Case object Last modified by owner date/time. I also created a formula
field and a workflow rule to insert date and time whenever Only the Case Owner modify the status
field. Now i am trying to create another workflow rule that if Case Owner doesn't modify case status
with in 3 days then it should send email notification to manager that the status of this case hasn't
been changed by case owner in last 3 days.
Solution :
1. Create a formula field / return type checkbox on case.

2. Create a workflow rule with entry criteria: above checkbox is true - add wf rule - email to send
the notification

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 11
Question 13: Can we have a formula field , which will be updated based on two other
fields ?
In Leads Page, I want to have a Sales Score Text field (formula field ), which needs to be updated
by first checking the campaign field is empty or not and has to update the Sales Score field based
on other Campaign Score field (Number field).
Solution :

Code :
IF(ISBLANK(Campaign_Field_Name__c),Campaign_Score_Field__c,"NA")

www.bispsolutions.com

www.bisptrainigs.com

www.hyperionguru.com

Page 12

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Customer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases EffectivelyCustomer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases Effectively
 
Data model in salesforce
Data model in salesforceData model in salesforce
Data model in salesforce
 
Salesforce Marketing cloud
Salesforce Marketing cloudSalesforce Marketing cloud
Salesforce Marketing cloud
 
Demystify Salesforce Bulk API
Demystify Salesforce Bulk APIDemystify Salesforce Bulk API
Demystify Salesforce Bulk API
 
Modelo - Metodologia HEFESTO.pdf
Modelo - Metodologia HEFESTO.pdfModelo - Metodologia HEFESTO.pdf
Modelo - Metodologia HEFESTO.pdf
 
Developing dynamics 365 reports in dynamics 365
Developing dynamics 365 reports in dynamics 365Developing dynamics 365 reports in dynamics 365
Developing dynamics 365 reports in dynamics 365
 
What is Salesforce lighting explained
What is Salesforce lighting explainedWhat is Salesforce lighting explained
What is Salesforce lighting explained
 
bigquery.pptx
bigquery.pptxbigquery.pptx
bigquery.pptx
 
Architecting Agile Data Applications for Scale
Architecting Agile Data Applications for ScaleArchitecting Agile Data Applications for Scale
Architecting Agile Data Applications for Scale
 
Marketing cloud development
Marketing cloud developmentMarketing cloud development
Marketing cloud development
 
Salesforce Developer Console ppt
Salesforce Developer Console  pptSalesforce Developer Console  ppt
Salesforce Developer Console ppt
 
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best PracticesSimplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practices
 
Salesforce administrator training presentation slides
Salesforce administrator training presentation slides Salesforce administrator training presentation slides
Salesforce administrator training presentation slides
 
Salesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demoSalesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demo
 
Salesforce.com Org Migration Overview
Salesforce.com Org Migration OverviewSalesforce.com Org Migration Overview
Salesforce.com Org Migration Overview
 
Using Personas for Salesforce Accessibility and Security
Using Personas for Salesforce Accessibility and SecurityUsing Personas for Salesforce Accessibility and Security
Using Personas for Salesforce Accessibility and Security
 
Guia Looker Studio.pdf
Guia Looker Studio.pdfGuia Looker Studio.pdf
Guia Looker Studio.pdf
 
Record sharing model in salesforce
Record sharing model in salesforceRecord sharing model in salesforce
Record sharing model in salesforce
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for Beginners
 
Salesforce complete overview
Salesforce complete overviewSalesforce complete overview
Salesforce complete overview
 

Destaque

Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interface
Amit Sharma
 
Bisp sales force-course-curriculumn
Bisp sales force-course-curriculumnBisp sales force-course-curriculumn
Bisp sales force-course-curriculumn
Amit Sharma
 
Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interface
Amit Sharma
 
Managing users-doc
Managing users-docManaging users-doc
Managing users-doc
Amit Sharma
 
Security and-data-access-document
Security and-data-access-documentSecurity and-data-access-document
Security and-data-access-document
Amit Sharma
 
Sales force managing-data
Sales force managing-dataSales force managing-data
Sales force managing-data
Amit Sharma
 

Destaque (7)

Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interface
 
Bisp sales force-course-curriculumn
Bisp sales force-course-curriculumnBisp sales force-course-curriculumn
Bisp sales force-course-curriculumn
 
Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interface
 
Managing users-doc
Managing users-docManaging users-doc
Managing users-doc
 
Security and-data-access-document
Security and-data-access-documentSecurity and-data-access-document
Security and-data-access-document
 
Sales force managing-data
Sales force managing-dataSales force managing-data
Sales force managing-data
 
Salesforce crm projects
Salesforce crm projects Salesforce crm projects
Salesforce crm projects
 

Semelhante a Salesforce interview preparation toolkit formula and validation rules in sales force

Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Amit Sharma
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
Amit Sharma
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
Amit Sharma
 
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdfGoogle.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
ssuser22b701
 
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdfgratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
NarReg
 
Lesson 4 Advanced Spreadsheet Skills/Post-Test
Lesson 4 Advanced Spreadsheet Skills/Post-TestLesson 4 Advanced Spreadsheet Skills/Post-Test
Lesson 4 Advanced Spreadsheet Skills/Post-Test
daki01
 

Semelhante a Salesforce interview preparation toolkit formula and validation rules in sales force (20)

Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
 
1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals
 
1 z0 047
1 z0 0471 z0 047
1 z0 047
 
2020 Updated Microsoft MB-200 Questions and Answers
2020 Updated Microsoft MB-200 Questions and Answers2020 Updated Microsoft MB-200 Questions and Answers
2020 Updated Microsoft MB-200 Questions and Answers
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
 
70-347 Microsoft
70-347 Microsoft70-347 Microsoft
70-347 Microsoft
 
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdfGoogle.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
 
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdfgratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
gratisexam.com-Oracle.BrainDumps.1z0-061.v2016-10-10.by.Laura.75q.pdf
 
Microsoft Commerce Functional Consultant MB-340 Training
Microsoft Commerce Functional Consultant MB-340 TrainingMicrosoft Commerce Functional Consultant MB-340 Training
Microsoft Commerce Functional Consultant MB-340 Training
 
Da 100-questions
Da 100-questionsDa 100-questions
Da 100-questions
 
70 486 questions answers
70 486 questions answers70 486 questions answers
70 486 questions answers
 
Salesforce Admin Hacks
Salesforce Admin HacksSalesforce Admin Hacks
Salesforce Admin Hacks
 
Ex
ExEx
Ex
 
Lesson 4 Advanced Spreadsheet Skills/Post-Test
Lesson 4 Advanced Spreadsheet Skills/Post-TestLesson 4 Advanced Spreadsheet Skills/Post-Test
Lesson 4 Advanced Spreadsheet Skills/Post-Test
 
70433 Dumps DB
70433 Dumps DB70433 Dumps DB
70433 Dumps DB
 
Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库
 
Tutorial - Learn SQL with Live Online Database
Tutorial - Learn SQL with Live Online DatabaseTutorial - Learn SQL with Live Online Database
Tutorial - Learn SQL with Live Online Database
 
exa_cer_g23
exa_cer_g23exa_cer_g23
exa_cer_g23
 
asp.net - for merge.docx
asp.net - for merge.docxasp.net - for merge.docx
asp.net - for merge.docx
 

Mais de Amit Sharma

Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1
Amit Sharma
 
Oracle apex hands on lab#2
Oracle apex hands on lab#2Oracle apex hands on lab#2
Oracle apex hands on lab#2
Amit Sharma
 
Sales force certification-lab-ii
Sales force certification-lab-iiSales force certification-lab-ii
Sales force certification-lab-ii
Amit Sharma
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
Amit Sharma
 
E mail and-workflow-administation
E mail and-workflow-administationE mail and-workflow-administation
E mail and-workflow-administation
Amit Sharma
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
Amit Sharma
 

Mais de Amit Sharma (20)

Oracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptionsOracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptions
 
Oracle EPBCS Driver
Oracle EPBCS Driver Oracle EPBCS Driver
Oracle EPBCS Driver
 
Oracle Sales Quotation Planning
Oracle Sales Quotation PlanningOracle Sales Quotation Planning
Oracle Sales Quotation Planning
 
Oracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp convertedOracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp converted
 
Basics of fdmee
Basics of fdmeeBasics of fdmee
Basics of fdmee
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
Oracle PBCS creating standard application
Oracle PBCS creating  standard applicationOracle PBCS creating  standard application
Oracle PBCS creating standard application
 
Hfm rule custom consolidation
Hfm rule custom consolidationHfm rule custom consolidation
Hfm rule custom consolidation
 
Hfm calculating RoA
Hfm calculating RoAHfm calculating RoA
Hfm calculating RoA
 
Adding metadata using smartview
Adding metadata using smartviewAdding metadata using smartview
Adding metadata using smartview
 
Hyperion planning weekly distribution
Hyperion planning weekly distributionHyperion planning weekly distribution
Hyperion planning weekly distribution
 
Hyperion planning scheduling data import
Hyperion planning scheduling data importHyperion planning scheduling data import
Hyperion planning scheduling data import
 
Hyperion planning new features
Hyperion planning new featuresHyperion planning new features
Hyperion planning new features
 
Microsoft dynamics crm videos
Microsoft dynamics crm videosMicrosoft dynamics crm videos
Microsoft dynamics crm videos
 
Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1
 
Oracle apex hands on lab#2
Oracle apex hands on lab#2Oracle apex hands on lab#2
Oracle apex hands on lab#2
 
Sales force certification-lab-ii
Sales force certification-lab-iiSales force certification-lab-ii
Sales force certification-lab-ii
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 
E mail and-workflow-administation
E mail and-workflow-administationE mail and-workflow-administation
E mail and-workflow-administation
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Salesforce interview preparation toolkit formula and validation rules in sales force

  • 1. Salesforce Interview Preparation Toolkit Formula and Validation Rules in SalesForce CRM Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for SalesForce. The document focuses on some common interview questions related to Formulas and Validation Rules. Join our professional training program and learn from experts. History: Version Description Change 0.1 Initial Draft 0.1 Review#1 www.bispsolutions.com Author Chandra Prakash Sharma Amit Sharma www.bisptrainigs.com Publish Date 10th Apr 2013 10th Apr 2013 www.hyperionguru.com Page 1
  • 2. Question : 1 SAP_Account_Id__c and Navison_Account_Id__c are two Text fields, Sell_to__c and Ship_to__c are two checkboxes. The rule should ensure that a record which has either SAP_Account_Id__c or Navison_Account_Id__c filled in (or both), can be saved only if either Sell_to__c and Ship_to__c (or both) are checked. Solution : Go to Setup > Create > Objects > Select object name(Ex: Sap Account), then go to down select Validation rule Click on New button, you can see below. Then write here validation rule you can see below. Note : If you need Both check box check use this Validation. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 2
  • 3. OR( ISBLANK( SAP_Account_Id__c ) , ISBLANK( Navison_Account_Id__c ) ,IF( Sell_to__c = false, true ,false) ,IF( ship_to__c = false, true ,false) ) Question : 2 Create a validation rule that when My_Check__c is unchecked, the TextField1__c and TextField2__c should have no values. Solution : Below is validation Rule .. Code : OR(My_Check__c== FALSE , (OR( ISBLANK( TextField1__c ) , ISBLANK( TextField2__c ) ) ) ) www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 3
  • 4. Question 3 : Validation rule for currency with 2 decimal values Example : Valid: 12.00, 12.10, 12.01, 12.56 Not Valid: 12, 12.1, 12.0,12.203 Solution : NOT(REGEX(Price__c,"[0-9]+[.]{1}[0-9]{2}")) Question 4 : I need to apply to formula to the field which depends on some other field. I created a picklist field which contains BOX, Class-A, Class-B, Class-C. If anyone selected BOX in that picklist field then automatically Ticket fare has to reflect as 100,if they selected Class-A then 75 has to reflect and so on. Solution : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 4
  • 5. Code : IF(ISPICKVAL( Seats_Category__c, 'Box'),"100",IF(ISPICKVAL(Seats_Category__c, 'ClassA'),"75",IF(ISPICKVAL(Seats_Category__c, 'ClassB'),"50",IF(ISPICKVAL(Seats_Category__c,'Class-C'),"25","0")))) Result : Question 5: Compare 2 checkboxes to complete a text field. Need to compare the contents of 2 checkbox fields. If they both are checked, I want the new field to display "Digital and Physical". If the digital checkbox field is checked, but the physical one is not, then I want to display "Digital Only". If the physical checkbox field is checked but the digital one is not, then I want to display "Physical Only". If neither fields are checked, then I want to display "Neither". Solution : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 5
  • 6. Validation Rule : Code : IF( AND( Channel_Digital_Distribution__c == False, Channel_Physical_Fulfillment__c == False) , "Neither", IF( AND( Channel_Digital_Distribution__c == True , Channel_Physical_Fulfillment__c == True) , "Digital and Physical", IF( Channel_Physical_Fulfillment__c == True , "Physical Only", IF(Channel_Digital_Distribution__c == True , " Digital Only" , "False") ) ) ) Question 6 : Calculate Case Age excluding weekends. Create one formula field (returns number) which will calculate Case Age (In days) such that it will keep incrementing until case is closed. If the case is closed it will stop counting. This excludes weekends. Solution : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 6
  • 7. Formula : Question 7 : validation rules to validate email address format. Since it is a text field, there is possibility that user will enter wrong email address for e.g.: abc2ht.com (missing '@'). is there any validation formula rule that can validate email address format can share here.? Solution : Code : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 7
  • 8. NOT(REGEX( Email_Id__c ,"[a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z]{2,4}")) Question 8 : Limit number of selections from multi-select picklist. There a way to restrict users to only picking 3 selections from a multi-select picklist that contains 20 options.? Solution 8 : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 8
  • 9. Code : IF(INCLUDES(Multi_Picklist__c, "A"),1,0) + IF(INCLUDES( Multi_Picklist__c, "B"),1,0) + IF(INCLUDES( Multi_Picklist__c, "C"),1,0) + IF(INCLUDES( Multi_Picklist__c, "D"),1,0) + IF(INCLUDES( Multi_Picklist__c, "E"),1,0) > 3 Question 9 : Text field allows [a-z][A-Z] and space bar only. I have created one custom text(Text01__c) field. This field allows characters [a-z][A-Z] and space bar only. Any formula or validation rule or workflow rule. It not allows numeric's [0-9] and special character. Solution : NOT(REGEX(Text01__c, "([a-zA-Z ])*")) Question 10 : Validation Rule Help Please. Trying to create an error when an opportunity stage is dead that you have to pick a reason why from a picklist. That part I got... now trying to limit it to 2 departments which is another picklist. Solution : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 9
  • 10. Question 11 : Number of days between Event and CloseDate. We want to know how many days it takes from visiting the customer until the opportunity is closed. We use events only for these visits, so every account only has one event. What I need to do is to copy the date of this event either to an opportunity or account to add another custom field to calculate the days between start date (I already cloned this field in the event to use it in formulas) and close date. Another problem is, that CloseDate is only Date and not DateTime like my cloned StartDate. Any chance to calculate it anyway.? Solution : Here Apex Trigger Code. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 10
  • 11. Apex Class : Here you can write apex test class. Question 12 : Last modified date workflow rule. Created a custom field on Case object Last modified by owner date/time. I also created a formula field and a workflow rule to insert date and time whenever Only the Case Owner modify the status field. Now i am trying to create another workflow rule that if Case Owner doesn't modify case status with in 3 days then it should send email notification to manager that the status of this case hasn't been changed by case owner in last 3 days. Solution : 1. Create a formula field / return type checkbox on case. 2. Create a workflow rule with entry criteria: above checkbox is true - add wf rule - email to send the notification www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 11
  • 12. Question 13: Can we have a formula field , which will be updated based on two other fields ? In Leads Page, I want to have a Sales Score Text field (formula field ), which needs to be updated by first checking the campaign field is empty or not and has to update the Sales Score field based on other Campaign Score field (Number field). Solution : Code : IF(ISBLANK(Campaign_Field_Name__c),Campaign_Score_Field__c,"NA") www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 12