Posts

LinkedIn

An Easy approach to Take Metadata Backup of your Org - Using sfdx mdapi and powershell script

Image
 Most of the time, taking metadata back up of your org involves lots of manual effort or usage of some third-party tools. So I would like to share a comparatively simple approach that involves less manual effort.   This is using the power of sfdx metadata api commands along with PowerShell script.  Prerequisite  Install and set up Salesforce CLI Follow the below link to install Salesforce CLI https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm  Script Logic Script Logic involves below high-level activities Let us see this in detail. First, we can create a file and save it as  downloadcompfinal.ps1 1. Connect to your Org You need to establish a connection to the Org from which you need to retrieve metadata. For that we can use the below command in your script file: sfdx force : auth : web : login -- setalias <your alias name>demoorg This will open a login window and you can provide credentials of...

Why and How we need to remove retired functionalities from a Salesforce Org

Image
 Salesforce Orgs -  which are existing for more than 5 years, it is very common that some functionalities become obsolete after a certain period of time. Let us see why and how we need to remove these retired functionalities and related components.  Why we need to Remove retired functionalities   1. Better Salesforce Governor Limits Like you know, Salesforce is having many limits with respect to the number of fields, the number of objects, code storage, validation rules, formula fields, etc. per Org. When we remove/delete unwanted components from an Org, it gives us additional space for new functionalities 2. Improve Performance  There might be associated back end logic which is still getting executed on a record save, even if that feature is not in use. It will consume execution time, SOQL/DML limits of your current transaction. So removing this logic will help with better transaction performance 3. Avoid Unexpected Exceptions Obsolete backend functio...

Screen Flows - Exception Handling & Logging - Custom Platform Events Vs Flow Execution Error Event

Image
In the previous post , we saw how to handle and log exceptions in auto-launched flows. In this post let us see Exception handling and logging for screen flows. For this let us use the below Use case: Object - Account Flow Functionality -  If the Account type(picklist with values End-User, Partner) is Partner Account – Display a screen to enter additional details by user and based on entered values, decide Account Partnership level(picklist) as Diamond, Gold or Silver. This screen flow  will be added to Account record page. Below is the Screen flow which implements this. Scenario - 1 - Partnership Level Updated Successfully Add this flow to Account Record page like shown below: We can make this conditionally visible on the record page by adding component visibility criteria so that screen will be visible only if Account Type is Partner: Now let us create an Account  - Account ABC with below details: Name - Account ABC Active - True Account Type - Partner And we can see tha...