600 likes | 739 Vues
Discover how to leverage Salesforce validation rules to maintain data integrity and streamline operations in nonprofit organizations. Join expert consultants Francis Scudellari and Trish Perkins from Cloud for Good, who specialize in implementing strategic cloud solutions tailored for nonprofits. Learn what validation rules are, their importance, and gain practical tips and examples for using them effectively in Salesforce. Perfect for nonprofits looking to optimize their data management practices.
E N D
It’s all about your mission. www.cloud4good.com Francis Scudellari Trish Perkins Cloud Consultants francis@cloud4good.com trish@cloud4good.com Validation & Workflow in Salesforce
Cloud for Good Working with organizations to create and implement strategic solutions based on cloud technology. • Salesforce.com • Google Apps It’s all about Your mission. www.cloud4good.com
Francis • Certified Salesforce Administrator • Implementing Salesforce for nonprofits since 2009 • Providing technology-based solutions to nonprofits for over 12 years It’s all about Your mission. www.cloud4good.com
Trish • Certified Salesforce Administrator • Worked with nonprofits since 2005 • Ran the IT departments at three nonprofits before joining Cloud for Good. It’s all about Your mission. www.cloud4good.com
Agenda It’s all about Your mission. www.cloud4good.com
Section 1: Introduction To Validation Rules It’s all about Your mission. www.cloud4good.com
Topics: • What’s a Validation Rule? • Why add a Validation Rule? • How to find them • Tips on using them • Examples of useful rules in everyday Salesforce life Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
What’s a Validation Rule? “Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record.” --Salesforce Help File Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Why? • Ensure data integrity • Another way to require a field…or a way to conditionally require a field • Only allow certain users to change a field • Prevent records from a related list from being added or deleted Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
How to find them: Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
How to find them: Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Where? Standard Object Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Where? Step Two Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Where? Custom Objects Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Custom Objects Step Two Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Custom Objects Step Three Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Zip Code Example Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Zip Code - 2 Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Tips on using them: • Executed when a record is saved. • Make them either TRUE or FALSE • TRUE = an error message appears • Use formula functions + REGEX & VLOOKUP • Cross-object validation goes from parent to child, master to detail. Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Tell users exactly what they did wrong • Wrong: “You entered a wrong value.” • Wrong: “Oops, try again.” • Right: “That field is required.” • Right: Zip Codes need to be in this format: 99999 or 99999-9999 Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Examples from Real Life • Making sure that dates are entered correctly Begin_Date__c > End_Date__c "End Date cannot be before Begin Date.“ Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Examples from Real Life • Making sure the year is right YEAR( My_Date__c ) <> YEAR ( TODAY() ) "Date must be in the current year.“ Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Examples from Real Life • Making sure the percentage is right OR ( Mix_Pct__c > 1.0, Mix_Pct__c < 0.0 ) "Mix Pct must be between 0 and 100%." Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Examples from Real Life • Gettingthe zip code format right AND( OR(BillingCountry = "USA", BillingCountry = "US"), NOT(REGEX(BillingPostalCode, "\\d{5}(-\\d{4})?")) ) "Zip code must be in 99999 or 99999-9999 format.“ • Or the social security number NOT(REGEX(SSN__c , "\\d{3}-\\d{2}-[0-9]{4}")) "SSN must be in 999-99-9999 format" Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Examples from Real Life • Those pesky two-letter state codes! AND ( OR(BillingCountry = "US", BillingCountry="USA", ISBLANK(BillingCountry)), OR( LEN(BillingState) < 2, NOT( CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:" & "IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:" & "NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:" & "WA:WV:WI:WY", BillingState) ))) "A valid two-letter state code is required." Section 1: Validation Rules It’s all about Your mission. www.cloud4good.com
Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Topics: • What is Workflow? • Why add Workflow? • Think it through first • How to create workflow – Step by step through the process Section 2: Workflow It’s all about Your mission. www.cloud4good.com
What is Workflow? Workflow is a way to automate your business processes. While validation keeps your data clean, workflow takes the tedium out of repetitive tasks. Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Why add workflow? • Assign tasks – to yourself or your co-workers • Send emails automatically • Update fields automatically Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Thinking it through… What are the conditions that will trigger your workflow? • A record is created • A field is edited • Etc. How do you want the rule to handle the change? Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Find Workflow Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: New Rule Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Choose Object Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step:Name, Describe, Evaluation criteria Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Rule Criteria Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step:Using a Formula Instead Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Add Actions Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: New Task Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: New Email Alert Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Find Email Templates Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Email Alert-2 Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Field Update Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Show Formula Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Formulas - 1 Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Formulas -2 Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Outbound Message Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Add Time-Dependent Actions Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step: Time Trigger Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Step-by-Step:Time Trigger - 2 Section 2: Workflow It’s all about Your mission. www.cloud4good.com
Time Dependent Workflow Considerations: • You cannot attach time-triggers to an active Workflow Rule. • You cannot attach time-dependent actions to a workflow rule that uses “Every time a record is created or edited” as the evaluation criteria. • System Administrators can monitor all pending workflow actions in Setup. Section 2: Workflow It’s all about Your mission. www.cloud4good.com