Posts

Showing posts with the label Salesforce Tips

Safe Navigation Operator in Apex

Hello Ohana, It's been quite some time after my last blog as i was caught up with some personal and professional engagements, But nevertheless here i am back with one of the coolest apex features that i found with Winter 21 release. I was waiting the release to go live before i post this blog and now since WI 21 is live so lets discuss how to use it.  Before we begin with code example lets understand what exactly is safe navigation operator (?).  In very simple words it reduces the need to check for Null before accessing variable or method values which could cause Null Pointer Exception if left without checking. So now to answer the very obvious next question that "Can we get rid of all error handling and use Safe navigation Operator ?  instead" Answer is "No", what safe navigation does is instead of halting the code execution and throwing null pointer exception it simply returns null. Now lets understand it with an example.  Old Code to return null after checki...

Making your online Resume in 5 minutes on Salesforce

Image
Current pandemic has changed so many things in corporate and way of hiring has also changed a lot so In this post we will talk about creating your online resume using Community   Cloud on Salesforce in less than 5 mins. Considering you have already created your resume in word or PDF format and we will create a online version of it.  Prerequisites :    For this post we are considering that you have already signed up for developer org from salesforce and you are using it, If that's not the case with you don't worry you can always signup for a new account by clicking here . Once you have your org available login and go to setup by clicking on the Gear like icon. Step 1  : Enable community in your Org Search for Communities in your setup quick find window then select Communities Settings and enable it.  Enter a unique name to be used as your domain name and click Check Availability. Keep in mind that you can’t change the domain name yourself after you save i...

Validate and Auto Complete Styling in VS Code

Image
Hello Ohana, Doing styling of your Aura Components is never a big trouble thanks to SLDS , But remembering the styling tags has never been my thing so my development life cycle was to copy from SLDS Library page and paste it in component, However with VS Code it becomes little tricky to open a new tab copy from there and verify its working after deploying the component in the Org, But say no more Salesforce has been kind enough t give us a all new VS Code Extension (still in Preview) for validating and auto completing the SLDS classes in your component, We will talk about the Step by step use case in today's blog post. Step 1. Installation and Preview  : For the purpose of our use case we are assuming we already have installed the VS Code and using it for our Salesforce Development, so in order to install the SLDS Validator open your vs code go to extensions and Search for SLDS Validator , Click on install and after installation you can close and reopen your VS code if require...

Compare File against the Source Org in VS Code

Image
Hello Ohana, One of the major problems that we face while working with #VS Code in Non Source Controlled Salesforce Environments is Code Overwrite , I am not very sure about everyone but this was the problem we were facing in our org due to so many developers working in single sandbox and icing on the cake was that we were not using any version control tools in lower orgs. I have explained step by step process below how to overcome this issue with  Source Diff feature in #Salesforce CLI , Since its not generally available yet we have installed it as #CLI Plugin.  Step 1 Installation  . Go to Command Prompt for windows or Terminal for Mac and type below command               sfdx plugins:install @salesforce/sfdx-diff Some time due to digital signature verification unavailability it may ask you to confirm if you want to    install it, we will select as yes and proceed and you would see the success message like  below ...