Posts

Displaying pop-up summaries on hover in visualforce

What if I want to make a summary pop-up window when a user hovers over a link in a visualforce page. This Feature is easy in standard salesforce pages, mostly because it happens automatically. But not in visualforce pages. I have seen most of example for pop-up in salesforce were created using the output panels with some embedded styles.   Here I'm posting a pop-up example which show the details of a partuclar record on a mouseover using the Hover links similar to those used in standard Salesforce links.  /*visualforce page*/ <apex:page controller="PopupTest"> <apex:form > <apex:repeat value="{!accounts}" var="acc"> <br/> <a href="/{!acc.Id}" id="{!acc.Id}" onblur="LookupHoverDetail.getHover('{!acc.Id}').hide();" onfocus="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show(...

Summer '11 New Features - part 1 (Javascript Remoting)

JavaScript remoting was released as a Developer Preview in Spring '11. In Summer '11, JavaScript remoting now supports additional return data types. Also, references to the same objects are no longer duplicated in the response. Javascript remoting is the process that provides support for some methods in APEX controllers to be called via Javascript. This is an interesting feature and it'll be a good move to the interactive and fast user interface creation in visualforce. I have mentioned about javascript remoting one of my previous post . There is a nice example about Javascript Remoting.

Real-time sandbox environments in Salesforce

A sandbox is basically a replication of your Salesforce org you can use for development , testing, and training without disrupting your production environment. Sandboxes are completely isolated from your Salesforce production organization, so anything you do in your sandboxes will not affect your Salesforce production application, and vice-versa. Sandbox provides a set of tools that deliver real, tangible business benefits and it’s not just for developers. If you make a mess of things, your “real” data and org is protected and your sandbox can be refreshed 29 days from its creation or from the last refresh. You can be created a sandbox in production environment; Setup > Administration Setup > Data Management > Sandbox There are three types of sandboxes available to Salesforce.com customers. Configuration-only sandbox Configuration-only sandboxes copy all your production organization’s reports, dashboards, price books, products, apps, and customizations, but exclu...

Parameter passing using Javascript+actionFunction in visualforce

In visualforce, there is a method for passing parameters from visualforce page to controller using javascript and actionFunction. Here is the example; /*JavaScript*/ <script type="text/javascript"> function doSave(date) { paraFunction(document.getElementById(date).value); } </script> /*Action Function*/ <apex:actionFunction name="paraFunction" action="{!saveInterviewDate}" rerender="view"> <apex:param id="aname" name="interviewDate" value="" /> </apex:actionFunction> /*Call the javaScript from here*/ <apex:commandLink onclick="doSave('{!$Component.interviewDate}');"> <apex:commandButton value="Save"/> </apex:commandLink> /*get the parameter in controller*/ String interviewdate=Apexpages.currentPage().getParameters().get('interviewDate');

Javascript Remoting for APEX controller

Javascript remoting is the process that provides support for some methods in APEX controllers to be called via Javascript.The @RemoteAction annotation is currently available as a Developer preview.You have to contact Salesforce.com support to enable this feature.To use Javascript remoting, your request must take the following form: [<namespace>.]<controller>.<method>([params...,] <callbackFunction>(result, event) { // callback function logic }, {escape:true}); namespace is your organization's namespace. This is only required if the class comes from an installed packaged. controller is the name of your Apex controller method is the name of the Apex method you're calling params is the comma–separated list of parameters that your method takes callbackFunction is the name of the function that handles the response from the controller. It returns the status of the call and the method result. escape defines whether your response should be escaped (by defau...

Javascript with Visualforce pages

Javascript is one of key browser technology on Visualforce pages. Javascript provides the framework for communication between other Javascript objects, HTML elements and visualforce controller. This example will explain how can we use javascripts in visualforce pages. <apex:page> <script> function changeFont(input, textid) { if(input.checked) document.getElementById(textid).style.fontWeight = "bold"; else document.getElementById(textid).style.fontWeight = "normal"; } </script> <apex:outputPanel layout="block"> <label for="checkbox">Click this box to change text font: </label> <input id="checkbox" type="checkbox" onclick="changeFont(this,'{!$Component.thePanel}');"/> </apex:outputPanel> <apex:outputPanel id="thePanel" layout="block">Change me! </apex:outputPanel> </apex:page> '{!$Component.idName}' : This is the way...

Multi-Currency in Salesforce.com

Basically the multi-currency feature is not available in your organization on salesforce. We have to log a case or contact salesforce support team for activate the multi-currency feature on your organization. This request can only be made by a System Administrator Prior to converting your organization to multi-currency, some aspects of this feature that should be reviewed. The Multi-Currency functionality CANNOT be turned off once it is activated. Salesforce.com support team also recommends testing the activation in a Sandbox environment. The process locks the org when turning on Multi Currency (preventing users from logging in), this can take 30 minutes or more depending on the size of the organization. After activate this feature on your organization, you will have a standard field called "CurrencyIsoCode" as picklist in ont only standard objects but also in custom objects And You will have a place to manage your currencies in following path; Your Name-->Setup-->Admi...