Skip to main content

Posts

Showing posts from 2024

How to use Data Tables and filter component in Screen Flow?

  Business Requirement  You are salesforce Admin working in Acute Care company, receives patient referral from different hospitals, Intake user need to assign each patient to some facilities that has been configured under hospital Account. And if patient is already referred one facility then It should filter. Here is salesforce object references and Data Model  Lead - Stores Patient Information  Account - Hospital Account  Facility - Facility Information  Hospital Facility Mapping - Junction object between Account and Hospital Facility Mapping.  Opportunity - Created under Lead stores how many facility lead has been referred, so It is junction between  Lead and Facility. Solution without using Apex and LWC Create a Quick Action Named Assign Facility on Lead, which calls a screen flow.      2. On click of Assign Facility button, user can select which Facility to add.      3. Here is the whole flow. Let me explain each ...

How to Enforce Customer ID Format ?

  Business Requirements:  Each customer should have one customer Id in particular format and unique so that It can be sync other systems. Some customers may not have customer Id. If user add any customer information and enter customer Id then enforce that the customer ID should include the 2-character billing country code, a dash, and an 8-digit number (for example, US-12345678). Each customer ID must be exactly 11 characters in length with zero spaces. Solution: 1. Create a custom field on Account which is Text Type (length 11) and unique. 2. Create formula field Billing_Country_Code__c to get country code from Account address. Billing_Country_Code__C =  TEXT(BillingCountryCode) 3. Write Validation rule  Customer_ID_Format    AND(     NOT(ISBLANK(Customer_ID__c)), OR((LEFT(Customer_ID__c , 2) != Billing_Country_Code__c ), NOT(REGEX(Customer_ID__c, " ^[A-Z]{2}-\\d{8}$ "))   )       ) (LEFT(Customer_ID__c , 2) != Billing_Co...

How to use Conditional formatting in Lighting page/Dynamic form?

 Business Use Case : You need to high light case number based on case information, type of Case. This will be helpful for service agent to take glance of Case. If Census Type is Discharge then Red Color  If Census Type is Admission then Green Color  If Census Type is Continued Stay and NOMNC is Yes then Blue Color  If Census Type is Continued Stay then Purple Color.  Conditional Formatting Assign custom icons and colors that can appear, disappear, and change color based on the rules you create on fields.    For Example: Admission Census Type - Green Discharge: Red  Continued Stay and NOMNC is yes- Blue Continued Stay and NOMNC is No - Purple  We can add many icons not only just star, Here are list of icons. How can you configure conditional formatting rule ?  We can configure in highlight panel and also in lighting record page. In order to apply in highlight panel we need to use dynamic highlight panel. Go to the Record Page where you wa...