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...