Skip to main content

Posts

Showing posts from July, 2020

Connect #ZOOM with #Salesforce using #Zapier | Salesforce Tutorials

How to Create Manual Round Robin ID in Salesforce

In this blog you will learn to create a Manual Round Robin ID using custom Apex in Salesforce. The requirement was to create a Round Robin ID for Converted Lead with a particular status. I have implemented the functionality using some custom Apex and a process builder. In this video I will share my experience and work around for this strange requirement. #RoundRobinID #Salesforce
I will share my Apex in this blog, for complete configuration you can checkout my vlog below :
Apex 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19publicclass UpdateConvertedContact { @InvocableMethod publicstaticvoid updateContact(List<String> contactIds){ Double roundRobinValue =1; Contact con=[SELECT Id, Round_Robin_ID__c FROM Contact where Id in:contactIds]; List<Contact> conList = [SELECT Id, Round_Robin_ID__c, CreatedDate FROM Contact where Round_Robin_ID__c !=null order by CreatedDate desc limit 1]; if(conList !=…

Get Selected Records from ListView in Visualforce Page | #GETRECORDIDS JavaScript | #StandardSetController Salesforce

In this article you will learn to use GETRECORDIDS function to get selected records IDs in visual force page.
Requirement : The requirement was to convert onclick JavaScript on custom buttons to Visualforce page. In my scenario I am having a listview of accounts with checkbox. There is a custom button available on which there are some JavaScript function to follow the selected accounts. In my visualforce page I was able to call the JavaScript on page load but I was unable to get the selected Account IDs.
I found a workaround for that using GETRECORDIDS.
In JavaScript you can easily get selected records using GETRECCORDIDS, i.e for Account you can use {!GETRECORDIDS($ObjectType.Account)};
But in Visualforce page we have to get the IDs using StandardSetController.
Please follow below code to get selected records IDs from list view to VisualForce page.
Visualforce Page 1 2 3 4 5 6<apex:pagestandardController="Account"recordSetVar="accs"extensions="JavaScript_DemoV1Ctr…

Geocoding and Reverse Geocoding in Salesforce

In this blog you will learn to use Geocoding and Reverse Geocoding service in your Salesforce Org. Geocoding is the process of taking input text, such as an address or the name of a place, and returning a latitude/longitude location on the Earth's surface for that place. Reverse Geocoding, on the other hand, converts geographic coordinates to a description of a location, usually the name of a place or an addressable location. Geocoding relies on a computer representation of address points, the street / road network, together with postal and administrative boundaries.
Please checkout the apex class below :
Geocoding 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24publicclass Vlog_GoogleApiApex { @future(callout=true) publicstaticvoid parseJSONResponse() { String address='Ajmer+Rajasthan'; String key='AIzaSyC5Z3twwN_hX_uP1JrDnY_726nH26Zb058'; Http httpProtocol =new Http(); // Create HTTP request to se…

Gantt Charts in Salesforce Lightning | #SalesforceDevelopment #GanttCharts

In this blog you will learn to create Gantt Charts in Salesforce Lightning. We will use Google Gantt Chart script and we will customize it to display Gantt Chart dynamically in our Salesforce Org.
Please follow the code below : 
VF Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70<apex:page controller="Vlog_GanttChartCtrl"><apex:form ><html><head><script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><script type="text/javascript"> google.charts.load('current', {'packages':['gantt']}); google.charts.setOnLoadCallback(drawChart); function daysToMilliseconds(days) { return days *24*60*60*1000; } …

Open Facebook Messenger | Open Chat Window | Send Message using Lightning Component Salesforce

Hello folks,
In this blog you will learn to open Facebook Messenger from our Salesforce org. Then we will send message using the facebook messenger to the particular contact using their facebook username.
To store the username I have created a new custom field in my Contact object. The field api is fb_username__c
Please follow the code below : 
Component 1 2 3 4 5<aura:componentcontroller="Vlog_facebookCTRL"implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"access="global"><aura:attributename="recordId"type="String"/><aura:attributename="con"type="Contact"/><aura:handlername="init"action="{!c.doInit}"value="{!this}"/></aura:component>

Controller.js 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24({ doInit :f…