Skip to main content

Latest Post

Custom Metadata Types vs Custom Settings vs Custom Labels

  Custom Metadata Types vs Custom Settings vs Custom Labels 💬 In plain words:  Three lookalikes: Custom Metadata = configuration that DEPLOYS with your code (best for app settings). Custom Settings = org/user-specific values, changeable at runtime (hierarchy type is great for bypass switches). Custom Labels = translatable text for the UI. 📌 Example:  API endpoint URLs per environment → Custom Metadata (deploys with code, sandbox vs prod values). A 'Bypass_Automation__c' checkbox an admin flips during data load → hierarchy Custom Setting. The word 'Submit' translated to Hindi → Custom Label. 🎬 Real-Life Example: The Fee Table Trapped Inside Code  Skyline charges a different delivery fee per city. Apex needs those rates on every booking. The Old/Bad Way:  if (city == 'Delhi') fee = 50. Else if (city == 'Mumbai') fee = 65. … Every rate change is a code change, a test run, and a deployment. Why this is bad:  Business data is trappe...

Sharing rule for same profile and same role users and skinny table

 Question: What should you do if 2 users have profile "Profile A" and role "Role A".  In OWD settings "Opportunity" has private access. Now the requirement is one user A should have all opportunity read/write access of User B's opportunity.

Answer:-  1. Create a public group
                  2. Create a sharing setting based on criteria OR based on Role. whatever best matches your requirement.

                  3. Give access(Read/write) based on Requirement.

Question: We have a class with sharing and this class has Method1().  Someone call Method1() from without sharing class. What will happen?
Answer:  Sharing rules will be enforced. 

Question: What is the skinny table in salesforce?
Answer:- Skinny table contains frequently used fields to avoid joins. This is mainly for performance. salesforce creates these tables based on requests. This table holds copies of live data.

Popular Posts

Salesforce LWC Code for Multi-Select Lookup

Introduction: In Salesforce Lightning Web Components (LWC), implementing a multi-select lookup field can enhance the user experience and provide greater flexibility for selecting multiple related records. In this blog post, we will walk through the process of creating a multi-select lookup field using LWC. We will cover the required code snippets and provide step-by-step instructions to help you implement this functionality in your Salesforce org.