Automation Champion

Automating Salesforce One Click at a Time
Automation Champion
  • Home
  • About Me
    • Testimonials
    • Resources
  • Process Builder
  • Salesforce Flow
  • Pardot
  • Apex
  • Training Details
    • Salesforce Administrator
    • Salesforce Advanced Administrator
    • Platform App Builder
    • Lightning Flow
    • Pardot
    • Sales Cloud
    • Service Cloud
    • Community Cloud
    • Hands-on Excercises
  • My Books
  • Contact Me
  • Tag: Add Validation Rules for Custom Metadata Type Field

    • Uncover Hidden Nuggets of Validation Rule – prized arrows in Admin’s Quiver!

      Posted at 9:11 AM by Rakesh Gupta, on July 24, 2018

      Now let us see. You are a super admin. If so then, one of the arrows that every super admin should have, in his/her Quiver, is a strong grasp of Validation Rule!

      Pause. Then, assess your skill sets and ask yourself – where am I on the scale of one to ten – ten being highly skilled? Want to be higher on the scale? Great! Welcome! For, this article is solely focused on uncovering hidden nuggets of Validation Rules! 

      Validation Rule is a great tool for every system administrator. However, there are many hidden facts about the Validation Rule that are not well known. For example, how can you use one Validation Rule, to manage many requirements, using Custom Metadata types?

      Read this article and learn how you can design Enterprise level Validation Rules, that will not only make your life easier but, it will also comply with best practices.

      In achieve and maintain data integrity within your system – especially when data is entered manually by a user – it is very important to impose constraints on the values being entered in the system. To enforce data quality, the system administrator can use the following option:

      1. Validation Rule
      2. Validate data using Apex Trigger
      3. Unique fields
      4. Picklist and dependent picklist fields 
      5. Lookup Filters
      6. Record Types
      7. Process Builder

      Validation Rules allows a system administrator to define custom logic and error messages to ensure data integrity. A Validation Rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of True or False. Validation Rules also include an error message that displays when the rule returns a value of True – indicating that inaccurate data is being entered. Remember, a Validation rule only fires when a record is created or edited. 

      Let’s understand the workings of Validation Rules by looking at few use cases.

      Business Use Case: Edward Backhouse is working as a System Administrator at Gurukul on Cloud (GoC). Edward received the following requirement from his manager – don’t allow anyone to delete an Opportunity which is associated with an Account. 

      A solution for the above business requirement: As discussed earlier in this article, a Validation Rule only fires when a record is created or edited. But, we want to validate the data before deleting a record. To achieve this, we need to write a Before Trigger – similar to the code below:

      trigger CheckAccountStatusBeforeDeletion on Opportunity (before delete) {
      for(Opportunity myOpps : Trigger.old) {
      if(myOpps.AccountId!=null) {
      myOpps.addError('You are not allowed to delete Opportunity for active Account');
      }
      }
      }
      

      Now you understand how to handle data validation before a record gets deleted. Before moving ahead, remind yourself again that Validation Rules only fire when a record is created or edited. Secondly, that Validation Rule will not fire/execute when a record is updated through Workflow Rule or Process Builder’s scheduled action.  


      Edward Backhouse is working as a System Administrator at Gurukul on Cloud (GoC). Impressed by his Validation Rule skills, Edward received another requirement from his manager – (1) whenever a lead is created or edited it must have Email or Phone Number populated; and (2) bypass this Validation Rule for the system administrator.

      It is easy to bypass a Validation Rule for a single user or a profile – in this case, a system administrator – by adding a condition in your Validation Rule as shown in the following screenshot:

      Business Use Case:  So far so good. But, what happens if the manager comes back, like he always does!, after few weeks, and requests Edward to bypass Validation Rule for one more profile and one more user (belonging to a different profile)?

      If this happens, it would create a headache for Edward – how many times is he going to modify a validation rule to bypass it for different profiles or users? As if this was not bad enough, let us suppose that after few months again, Edward gets yet another requirement to bypass the Validation Rule for few more users who belong to different profiles – What a nightmare!  Read the rest of this entry!

      Posted in Administrator | 1 Comment | Tagged 5 most used Validation Rule, Add Validation Rules for Custom Metadata Type Field, bypass this Validation Rule, bypass this Validation Rule for one user, bypass this Validation Rule for the system administrator, bypass this Validation Rule in Salesforce, Custom Label and Validation Rule, Custom Metadata and Validation Rule, Custom Permission and Validation Rule, Custom Permission in Validation Rule, Learning, Most useful Validation Rule, Most useful Validation Rule in Salesforce, Record Clone and Validation Rule, Record Clone and Validation Rule Salesforce, Salesforce Training, Salesforce Validation Rule, Trailhead, Trailhead Validation Rule, Validation Rule, Validation Rule best practice, Validation Rule best practices, Validation Rule for Awesome Admin, Validation Rule in Salesforce, Validation Rule to prevent deletion, Validation Rule to stop deletion, Validation Rule to stop deletion Salesforce
    • Salesforce Summer17 release quick summary

      Posted at 5:31 AM by Rakesh Gupta, on April 23, 2017

      *Image credit – Daniel Peter

      Salesforce Summer’17 release notes preview are out. The Summer’17 release of Salesforce is now in available under the pre-release program. On 05th and 06th May Sandboxes will be upgraded so that your organization gets the look and feel of Summer’17 release. In this release, you can find lot of new features as well as new enhancements related to Lightning Experience, and Search functionalities.

      For example, Make the Lightning Experience the only experience, Navigate to a Record Directly from an Action Success Message, Lightning Console Split View, Access Field History related lists in Lightning Experience, and  See Results from External Search Engines with Federated Search are now available in Lightning Experience. 

      Also, check out these beta and pilot features:

      • Connect Your Content Management System to Your Community (Beta): – CMS Connect lets you bring your Adobe Experience Manager content, such as headers, footers, and banners, into your community. CMS Connect is available in communities that are based on Customer Service (Napili), Partner Central, and any Lightning Bolt solutions.
      • Encrypt Sensitive Lead Fields (Beta): -You can now encrypt 10 standard fields containing personally identifying information (PII) in Lead records.
      • Dynamically Update Flow Screen Fields (Pilot): -Use field rules to control when to show, or hide, particular screen fields. Turn your flows into guided UIs that respond to users’ inputs and selections. This feature is available in Lightning Experience, Salesforce Classic, and all versions of the Salesforce1 mobile app. However, it takes effect only for flows that use Lightning runtime.
      • Lightning Console JavaScript API (Pilot): – The Lightning Console JavaScript API provides JavaScript methods so that developers can programmatically control tabs, subtabs, and the utility bar in Lightning console apps. 
      • Lightning Data Service (Beta): – Use Lightning Data Service to load, create, edit, or delete a record in your component, without using Apex code. Lightning Data Service handles sharing rules and field-level security for you. Lightning Data Service also improves performance and user-interface consistency.
      • Use Advanced PDF to Render Visualforce Pages as PDF Files (Pilot): – Advanced PDF renders Visualforce pages as PDF files with broader support for modern HTML standards, such as CSS3, JavaScript, and HTML5. 

      You can now convert an existing object level picklist to a Global value Set. To promote a single picklist field into a global value set, edit your picklist field by clicking Promote to Global Value Set button.

      Promote Your Picklist Fields to Global Value Sets

      Promote Your Picklist Fields to Global Value Sets

      Lightning Experience is supported by Apple® Safari® version 10.x+ on Mac OS X and Microsoft® Edge for Windows® 10. The most recent stable versions of Mozilla® Firefox® and Google Chrome™ are also supported. Microsoft® Internet Explorer® version 11 is retiring starting in Summer ’16(EOL December 31, 2020). You can’t access Lightning Experience in a mobile browser.

      Salesforce Classic is supported with Microsoft® Internet Explorer® version 9, 10, and 11, Apple® Safari® version 8.x, 9.x, and 10.x on Mac OS X, and Microsoft® Edge for Windows® 10. The most recent stable versions of Mozilla® Firefox® and Google Chrome™ are also supported. Below is the quick summary of Summer’17 release from user’s /customer’s

      Customers/Users Point of view

      1. Use Your Classic Email Templates in Lightning Experience: – Now it is possible to use Salesforce Classic email templates in Lightning Experience. You can use your Text, Custom HTML, and Letterhead email templates in Lightning Experience. This change applies to Lightning Experience only.

      Reference – Salesforce release notes

      2. Filter Your Case Feed in Lightning Experience: – Support agents can find what they are looking for in a case faster by using filters in feed-based case page layouts. This change applies to Lightning Experience only. For support agents, Lightning Experience feed filters work just like Salesforce Classic filters. Lightning Experience users see any custom feed filters created in your instance of Salesforce. 

      Reference – Salesforce release notes

      Read the rest of this entry!

      Posted in Summer'17 Release | 0 Comments | Tagged @isTest(isParallel=true), Access Encrypted Data in Flow, Access Encrypted Data in Process Builder, Access Field History related lists in Lightning Experience, Access Visualforce Page Metrics Using the SOAP API, Add Dashboard Filters in Lightning Experience, Add Members to Campaigns from Reports, Add Validation Rules for Custom Metadata Type Field, Admin 201 exam salesforce, Admin exam dumps salesforce, Admin exam salesforce, Admin practice exam salesforce, advance developer, Advanced PDF to Render Visualforce Pages as PDF Files, and Delete Case Comments Lightning Experience, and Delete Case Comments Salesforce1, App builder exam dumps, App builder exam salesforce, App builder practice exam, aura:valueRender, bihar, Connect Your Content Management System to Your Community, convert an existing picklist to global picklist, Convert Attachments to Files, Create, Create Report and Dashboard Folders in Lightning Experience, Custom Metadata Type, Custom Metadata Type in Salesforce, Custom Metadata Types Support Long Text Areas, Define Default Values at the Field Level, dev 401, Dreamforce’17, Dynamically Update Flow Screen Fields, Edit, Embed Your Flows in Lightning Pages, Embedded Login Enables Users to Log In to Your Website, Encrypt Sensitive Lead Fields, Exclude Subscriber Orgs from a Push Upgrade, Filter Groups to Show Unread Posts, Filter Your Case Feed in Lightning Experience, Find Object Manager More Quickly, Get Answers on the Go With Knowledge Articles in Salesforce1, Get More Information About Records Before You Tap, Katihar, Keep Related Files and Records When Reps Convert Leads, Launch Flows in Lightning Runtime, Lightning Console JavaScript API, Lightning Console Split View, Lightning Data Service, Lightning Experience Salesforce, lightning:actionOverride, Make the Lightning Experience the only experience, Navigate to a Record Directly from an Action Success Message, New Lightning LockerService Critical Update Activation, Open More Tabs from Setup with Right-Click, opportunity Stage History related list is now available in Lightning Experience, Override Standard Actions with Lightning Components, Parallel Testing on the isTest() Annotation, Platform Dev I exam, Platform Dev I exam dumps, Platform Dev II exam, Platform Dev II exam dumps, Redirect Flows That Render in Lightning Runtime, release notes, Removed LockerService Restriction on instanceof in JavaScript, Render Visualforce Pages as PDF Files, Retrieve and Deploy Metadata, sales cloud consultant, Sales Path, salesforce, salesforce admins, Salesforce developers, Salesforce release exam, Salesforce Summer17 release, Salesforce summer17 release exam, Salesforce Summer17 release notes, Salesforce Summer17 release notes HTML, Salesforce Summer17 release notes PDF, Salesforce Summer17 release summary, See Results from External Search Engines with Federated Search, See the Assignment Checkbox in Salesforce1, See the Case Assignment Checkbox in Salesforce1, See the Lead Assignment Checkbox in Salesforce1, Separate Data in Your Import File, service cloud consultant, Session-Based Permission Sets, Spring'15 pre-release login url, Spring'15 pre-release org, Subscribe Other People to Report, Subscribe reports, Summer'17 Release, Summer17 Process builder enhancement, Summer17 release exam, Summer17 release exam admin, Summer17 release exam app builder, Summer17 release exam developer, Summer17 release exam Marketing Cloud, Summer17 release exam notes, Summer17 release exam Pardot, Summer17 release exam Platform Dev I, Summer17 release exam Salesforce, Summer17 release note PDF, Summer17 release notes, Summer17 release notes HTML, Summer17 release notes in PDF, Summer17 release quick summary, Summer17 release Rakesh Gupta, Summer17 release Salesforce MVP, Summer17 release videos, Summer17 Sales cloud enhancement, Summer17 Visual flow enhancement, Summer17 Visualforce page enhancement, TrailheaDX, Use the aura:valueRender Event Instead of a Custom Renderer, Use Your Classic Email Templates in Lightning Experience, View, Visual Workflow enhancement, VisualforceAccessMetrics object, Workflows & Approvals
    • Search

    • Upcoming Trainings

      Salesforce Administrator Certification
      Salesforce Advanced Administrator Certification
      Salesforce Platform App Builder Certification
      Lightning Flow & Process Builder
      Advanced Lightning Flow
      Pardot Specialist & Consultant Certification
      Sales Cloud Consultant Certification
      Service Cloud Consultant Certification
      Community Cloud Consultant Certification
    • Sponsor #1

    • Sponsor #2

    • Sponsor #3

    • Sponsor #4

    • Order Now!

    • Buy My Book

    • Buy My Book

    • Recent Posts

      • Getting Started with Salesforce Flow – Part 58 (Customize Previous, Next, Finish, and Pause Button Label for Screen Flow!)
      • Streamline Data Collection with Salesforce-Connected Forms
      • Getting Started with Salesforce Flow – Part 56 (Merge Chatter Topics with the Help of Salesforce Flow)
      • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
      • Getting Started with Salesforce Flow – Part 55 (Add or Remove Followers to a Record with the Help of Salesforce Flow)
    • Salesforce ID Converter Build on Lightning Flow

      Converting 15 digit ID to 18 digit Salesforce ID
    • Blog Archives

    • Categories

  • Information

    • About Me
    • Affiliate Disclaimer
    • Contact Me
    • Privacy Policy
  • Top Posts

    • Learning Flow
    • Learning Process Builder
    • Salesforce Spring’21 Release Quick Summary
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Process Builder - Part 1 (Automatically Create a record)
    • Getting Started with Salesforce Flow – Part 4 (Need to Redirect a User to a New Record?)
    • Getting Started with Salesforce Flow – Part 41 (Create a Survey Using Flow? Why Not?!)
    • Getting Started with Salesforce Flow – Part 31 (Auto Submit Record into Approval Process with Flow)
    • Add Record to Multiple Chatter Groups - Parsing Multi-Select Picklist fields (Flow)
    • Getting Started with Salesforce Flow – Part 44 (Auto Convert Marketing Qualified Leads)
  • Social Media

    • View Automationchampion’s profile on Facebook
    • View Automationchamp’s profile on Twitter
    • View Rakeshistom’s profile on GitHub