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...
To integrate Google Drive with Salesforce, you can use the Google Drive REST API along with Apex code in Salesforce. Here's an example of Apex code that demonstrates how to authenticate with Google Drive and perform basic operations like listing files and uploading a file: Step 1: Set Up the Integration: 1. Create a new Connected App in Salesforce: - Go to Setup. - Search for "App Manager" and click on it. - Click on "New Connected App" and fill in the required details. - Enable OAuth settings and specify a callback URL. 2. Obtain the Google Drive API credentials: - Go to the Google API Console (https://console.developers.google.com/). - Create a new project or select an existing one. - Enable the Google Drive API. - Create API credentials (OAuth 2.0 Client ID). - Make sure to set the correct redirect URI (callback URL). Step 2: Apex Code Integration...