Posts

Quick Complete Guide : VS Code Extensions

Image
My VS Code Extensions : For Salesforce 1. Quick Metadata Backup (SFMDB) VS Code Extension for Metadata Backup with Single Command in VS Code Command Palette. you can download from Microsoft Marketplace : https://marketplace.visualstudio.com/items?itemName=SanjayRathore.quick-salesforce-metadata-backup 2. Quick Salesforce Apex Class (SFAC) VS Code Extension for Salesforce Apex Classes with Single Command in VS Code Command Palette. you can download from Microsoft Marketplace : https://marketplace.visualstudio.com/items?itemName=SanjayRathore.quick-salesforce-apex-class What are extensions? It's not a secret that VS Code is becoming a very popular choice as editor for many developers.VS Code extensions are awesome, they provide amazing convenience that is limited only by your imagination. One of the most impressive parts of Visual Studio Code is customizability, especially via extensions. If you're a web developer, you won't be able to live w...

Salesforce Trigger with Http Callout

Image
Salesforce Trigger with Http Callout This blog will provide the information to implementation HTTP Callout from Trigger. Salesforce has two ways to execute a callout from a trigger is to run it asynchronously. There are following : From @future method : Use when only single callout in Trigger From Queueable Interface Class : Use when need multiple callout in Trigger Let’s do implement and enjoy this magic!! From @future method Future methods execute asynchronously.Future Apex is used to run processes in a separate thread, at a later time when system resources become available. Some important point for future method Method should be return void type. Method should be static. Method support only primitive data types. Method support callout with allow callout.(Default is callout = false). trigger AccountTrigger on Account (after insert,after update) { if(Trigger.isAfter){ for(Account acc: Trigger.New){ if(!System.isFuture() && !...

Salesforce Integration With Google

Image
Salesforce Integration With Google This blog will provide the information to integrate Google drive with the simplest way without any complex apex code We have used Auth. Provider and Named credentials to handle authentication for Google Account. That's store the ‘Google Secret ID’ and ‘Google Client ID’ and Named Credential utilizes the Auth. Provider while making callout in custom Apex code. Advantage using Auth. Provider and Named Credential is that we do not need to handle authentication each and every time we make callout. Authentication will be done once we create the Named Credential associated with the Auth. Provider. Let’s do implement and enjoy this magic!! Step to Implements for whole Process Creating a Google Project for App Config Login into the google account for integrate with salesforce Navigate to https://console.developers.google.com/projectselector/apis/library?supportedpurview=project From the project drop-down create a Create a new project....

Salesforce for Custom Notification

Image
I have created one website for tracking COVID-19 infection so you see latest update by country. Click on below link. Live Tracking for Corona Virus Salesforce for Custom Notification In salesforce these is many way for custom notification. Below two ways I have describe in today's blog. Notification Type with Process Builder Change Data Capture with Lightning Component Notification Type with Process Builder This functionality is available to both on Salesforce Mobile Application and Desktop Lightning Experience. Push Notifications are a great way to notify Sales and Service Representative about the cases that need immediate attention or if an opportunity needs to follow up, maybe Opportunity has been closed-won or any other condition. Step 1. Create the Notification Type. Go to Setup → Notification Builder → Custom Notifications → New Step 2. Create the Process Builder Go to Setup → Process Builder → Create new Select your object, and if this should fire ...

Salesforce Batch Class for Aggregate Queries

Image
Salesforce Batch Class for Aggregate Queries Recently, I got one requirement, in which I have to use aggregate queries in batch apex class. My requirement was totally different. For blog I'm using Account and Contact as a example. Let us have a walkthrough how to set up Push Notification. Step 1. Create the Notification Route. AggregateResultIterator AggregateResultIterable Implementing to Database.Batchable Iterable start method of Batch Class AggregateResultIterator global class AggregateResultIterator implements Iterator { AggregateResult [] results {get;set;} // tracks which result item is returned Integer index {get; set;} global AggregateResultIterator(String query) { index = 0; results = Database.query(query); } global boolean hasNext(){ return results != null && !results.isEmpty() && index < results.size(); } global AggregateResult next(){ return results[index+...

Lightning Component With Custom PDF Preview

Image
Lightning Component With Custom PDF Preview Custom PDF with Header,Content and Footer PDF Visualforce Page (renderAs="pdf") Cover Page Name Email Phone Birthdate {!con.Name} {!con.Email} {!con.Phone} {!con.Birthdate} ...

Unboxing Salesforce feature for Developer

Image
Lightning Flow > Flow Builder as before Trigger Afternate for before trigger : Process Builder and using a record-change process to make additional updates to each record that triggers the process. Such a process can set the Region custom field automatically on each new case record. Before-save updates in flows accomplish that same goal, but much more quickly because each record doesn’t get saved to the database again. Apex triggers. A flow that makes before-save updates is similar to a before trigger. The previously described record-change process is similar to an after trigger. In a save procedure, before-save updates in flows are executed immediately prior to Apex before triggers. In the flow, the $Record global variable contains the record values. Use an Assignment element to update those values, and let Salesforce handle the rest. You don’t even have to create any variables or add an Update Records element to your flow. Lightning Flow > Flow Builder : Flow...