Posts

Visualforce for Beginners

Image
Visualforce Basics What is Visualforce? It is a web development framework. Developers can make complex UI both for mobile and desktop which can be hosted on forc.com environment. Visualforce provides access to Salesforce inbuilt features and enables us to extend them and introduce a new or custom functionality. There are some powerful features enabled in visualforce like standardcontroller with help if with we can create awesome new apps from scratch. That’s enough for the background lets dive into coding. Sample Visualforce code: <apex:page standardController=”account” > <apex:form > <apex:pageBlock > <apex:pageBlockSection columns=”1″> <apex:inputField value=”{! account.FirstName}”/> <apex:inputField value=”{! account.LastName}”/> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton action=”{!save}” value=”Save”/> </apex:pageBlockButtons> </apex:pageBlock> ...

Javascript remoting in salesforce

Javascript remoting  in salesforce can be useful in making a call to controller method without posting the whole form(<apex:form>) to server but whereas visualforce ajax functions( action function, action support, action poller) post the form. Javascript remoting in salesforce  let’s you pass parameter and it provides a callback function in which its parameter contains result returned back from apex method.  JavaScript remoting  allows you to run asynchronous actions by decoupling the page from the controller and to perform tasks on the page without having to reload the entire page, Apex  @RemoteAction  methods must be static and either global or public and requires you to write some JavaScript Apex Class :- global class JsRemotingExample { Public String name {get;set;} @RemoteAction public static String showText(String name) { return 'Hola '+name +', you did a server request to this method through Javascrip...

Displaying buttons on Apex Page Message

Image
Hi All, We might need to display button while showing page message to get user feed back.  Based on user feedback necessary action need to be taken care. For example Below is the code snippet.  <apex:pageMessages escape="false"/>  <apex:outputPanel rendered="{!isYesVisible}">         <apex:pageMessage severity="info" strength="3" summary="{!applicantMessage}">                           <apex:commandButton value="Yes" action="{!cloneOpportunity}"/>                 <apex:commandButton value="No" action="{!stayinSamePage}"/>                   </apex:pageMessage>             </apex:outputPanel>

SOQL vs SOSL explaination

SOQL vs SOSL explaination:- SOSL(Salesforce object search language) simplified :- Facebook graph search is much-a-like SOSL, After searching something you can see results returned from name,post, pages which in turn like returning a List of list of sObjects. SOQL(Salesforce object query language) simplified :- SOQL is like searching your Facebook friend list which in turn like returning a List of sObjects. Tabular comparison :- SOQL SOSL Data retrieval done via using ‘SELECT’ keyword Data retrieval done via using ‘FIND’ keyword Data retrieval from single object plus related objects Data retrieval from multiple objects. Much-a-like querying on single table Much-a-like querying on Multiple table SOQL and SOSL generally have the same limitations SOQL and SOSL generally have the same limitations Governor Limits on SOQL and SOSL :- SOQL Limits -> Total number of SOQL queries issued in synchronous mode is  100 , where in asynchronous mod...