Posts

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