Posts

WHATSAPP INTEGRATION WITH SALESFORCE

Image
Hola Trailblazer Community, Hope you all guys are good. So today i am planning to share my discovery with all of the trailblazer community. so from the headlines you might understood what i am going to share "Whatsapp Integration". I have googled a lot for that how to integrate whatsapp  account from CRM. Some python library also i have seen but no good luck in vain. Last 2-3 months back i have seen that twilio has launched "Twilio Api for WhatsApp".  You can check pricing here . With trail account you will get the sandbox . You can test your code there. Here i will not share a lot of things but only i will share you can able to send the message or templates from your sandbox number to any verified sandbox number. I will tell you these steps by steps. Step 1 : Create twilio trail account from here . Step 2 : go to sandbox  and enable your sandbox. After enabling the sandbox you will get the number for your sandbox account. Step 3 : Now you h...

COUNTDOWN COMPONENT IN LIGHTNING

Image
Hi Trailblazer Community , Today i am going to share the information of the Countdown or Timer Lightning Component.  Prerequisite : Basic knowledge of Lightning, Basic knowledge of Lightning Data Service. Need to work before : Create on object named Property__c -> Create one field named  Date_End__c (Date/Time type). So here i am sharing the code of the component. Step 1 : Create One Lightning Component Give  name it to "TimerComponent". ( You can give other name also. ). Copy the below code in the component. TimerComponent.cmp <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" > <!-- Attributes for Countdown Components--> <aura:attribute name="day" type="Integer" /> <aura:attribute name="hour" type="Integer" /> <aura:attribute name="minute" type="Integer" /> <aura:attribute...

OPTICAL CHARACTER RECOGNITION FROM THE MICROSOFT COGNITIVE API

Image
Hi Trailblazer Community, From a long back i was planning to write blog on optical character recognition but i was not getting time for it. So what is the Meaning of the OCR :- OCR ( optical character recognition ) is the recognition of printed or written text characters by a computer. This involves photoscanning of the text character-by-character, analysis of the scanned-in image, and then translation of the character image into character codes. I have done the OCR Reader work with Google Cloud Vision Api & Microsoft Cognitive Api. Microsoft Cognitive Api : From Microsoft Cognitive Api i have used the image url for scanning image. We can do OCR from base64 code also. Google Cloud Vision Api : From Google Cloud Vision Api i have done ocr using the base64 code. For R&D purpose i have created the account for Microsoft Cognitive Api . After creating account you will get the authentication id and authentication token. //Apex Class :  public with s...

PATH IS NOT COMING IN MOBILE??

Image
Hi Trailblazer Community, Last few days i was getting the problem that path was not showing in mobile. Might be you guys also have seen this issue. What i have done to resolve this problem i have used the lightning base component and override the mobile layout from by lightning component(Short and sweet).                                                                              || Above screenshots are showing the the path in Desktop and Mobile. I have used l ightning:path  base component for that that has been reduced my lines of code....Thanks @Salesforce for the base component. I have designed the Lightning Component for that and override with the mobile layout in Button and Action section. Here i am sharing the entire layout for that you can use this layout ...

CLOSE YOUR QUICK ACTION ONCE THE ACTION PERFORMED

Image
Hola Trailblazer Community, Today i am gonna share some solution for the problem that how to close the GLOBAL action once the record is created or once the once the action is performed. Use Case : I have created the global action from visualforce page OR lightning component how i will close the action automatically if my action completed the task. So .....Here we go...!! I will start from example... I have visualforce page. In my visualforce page i am creating contact. Now i want one global action for crating the contact and after creating the contact my global action should close and my current page should redirect to the contact which i have created from the action. //APEX CONTROLLER public with sharing class CloseAction {     public String lastname{get;set;}     public String contactId{get;set;}          public TestCloseAction(){ }          public void submit(){        ...

UPLOAD FILE FROM JAVASCRIPT REMOTING

Hi Trailblazer Community, How many times you have got the view state exceed problem in VF Page while uploading big size images. Might be you have solved that problem by setting the blob value null after uploading image. Today i will share the how to upload file from the Javascript Remoting. Here i am sharing the code snippet for that. //VF Page <apex:page controller="JsRemoting" standardStylesheets="false" sidebar="false" showHeader="false"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> function getRemoteAccount(obj_inpf) { var acc = obj_inpf.files[0]; var reader = new FileReader(); reader.readAsDataURL(acc); reader.onloadend = function(){ imgData = reader.result; Visualforce.remoting.Manager.invokeAction( ...

Visualforce Page In Salesforce1 App

How to Show Visualforce Page in Salesforce1 App Hi All Trailblazer Community, From long back i was getting problem to show the visualforce page in salesforce1 app. You can show that page after creating the tab. But it will be visible only on the Navigation Menu. So as i am perfect creating visualforce page so i preferred to do development in visualforce instead of lightning. For opening visualforce page from lightning in salesforce1 app i have used earlier :    Window.open('/apex/Mypage',height=400,width=500); But it was not working in the salesforce1 app. if you will use that in lightning then the app will ask to open that in chrome or other browser. fine it will work in chrome(Desktop and Mobile). But it will not work in salesforce1. Here i have used another method to open my visualforce page in salesforce1 app.      var urlEvent = $A.get("e.force:navigateToURL");     urlEvent.setParams({       "url": "/apex/Mypage...

HOW TO PASS VALUE FROM LIGHTNING COMPONENT TO CLIENT-SIDE CONTROLLER AND CLIENT-SIDE CONTROLLER TO SERVER-SIDE CONTROLLER

Image
Today i will share some simple lightning for those who are the beginner in Lightning. I know the is a lot of stuff for apex and visualforce but there is less resource for learning lightning. So here i am sharing some basic lightning stuff with you. After that chapter you will learn :- - How to take the value from lightning form to client-side controller. -How to  apply css in lightning component. -How to create and pass the value from client-side controller to server-side(Apex) controller. Here i will share the all the code snippet for all. Try to understand the meaning of the code if you can't able to understand please contact me or email me for any doubt. Step 1. Create Lightning app name as SimpleForm Step 2. Create Lightning component give the name FormComponent and paste the below code. <aura:component controller=" SimpleServerSideController ">         <div align="center" class="test">     ...

SALESFORCE INTEGRATION FROM 46ELKS USING REST API

Image
Salesforce Integration with 46elks using Rest Api : Hi Guys, Today i will share the new integration with salesforce.  Basically 46elks provide the service for phone call and send message. That is so simple. for  this you have to create the trail account on 46elks. after creating account on 46elks you will get you api credential  for using the service. So, Here we go....... Here i am sharing some code snippet for that :  Visualforce Page: <apex:page controller="SalesforceElk" tabStyle="Account">     <apex:form id="frm">         <apex:outputText value="{!error}" style="color:green;font-weight:50px"/>          <apex:pageBlock title="Call From Elk">             <apex:pageBlockSection collapsible="false" columns="2" title="Call Information">                 <apex:inputText value="{!callnumber...

Salesforce Integration with Plivo using Rest Api

Image
Visualforce Page: <apex:page controller="PilvoCntrl" tabStyle="Account">     <apex:form id="frm">         <apex:outputText value="{!error}" style="color:green;font-weight:50px"/>          <apex:pageBlock title="Call From Plivo">             <apex:pageBlockSection collapsible="false" columns="2" title="Call Information">                  <apex:commandButton value="Call" action="{!callPlivo}" reRender="frm"/>             </apex:pageBlockSection>        </apex:pageBlock>     </apex:form>   </apex:page> Apex Controller: public class PilvoCntrl{        public String error{get;set;}     public PilvoCntrl(){}          public void callPlivo() { ...

SALESFORCE INTEGRATION FROM TWILIO USING REST API

Integration with twilio using rest api. Using twilio service we can  send message  and  make call  to any numbers(Numbers should be verified from twilio). For doing this we should have little knowledge of  rest api .  Here i share snippet of the code of  Visualforce page and the Apex controller for both sending message and making call : For sending message : Visualforce Page:  < apex:page controller="SendMessage" tabStyle="Send_Message__tab">          < apex:form id="frm" >         < apex:outputText value="{!error}" style="color:green;font-weight:50px"/ >           < apex:pageBlock title="Message Sender" >             < apex:pageBlockSection columns="2" title="Information" collapsible="false" >                           ...