Thursday 30 July 2015

Custom Popup in Salesforce | Visualforce page

Please check below link for live demo

Class Should be:

public with sharing class CustomPopupController {

    public boolean showPopup {get;set;}
    public CustomPopupController ()
        showPopup = false;
    public PageReference openPopup()
        showPopup = true;
        return null;
    public PageReference Cancel()
        showPopup = false;
        return null;


Page Should be:-

<apex:page controller="CustomPopupController">
<style type="text/css">
        opacity: 0.20;
        filter: alpha(opacity = 20);
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 9998;
        background-color: white;
        border-width: 2px;
        border-style: solid;
        z-index: 9999;
        left: 50%;
        position: absolute;
        width: 500px;
        margin-left: -250px;

<apex:form >
 <apex:pageBlock > 

 <apex:commandButton action="{!openPopup}" value="Open Popup" />
 <apex:outputPanel id="tstpopup" rendered="{!showPopup}">
                <apex:outputPanel styleClass="popupBackground" layout="block" />
                    <apex:outputPanel styleClass="custPopup" layout="block" >
                              Hello this is Custom pop-Up<BR></BR>
                             <apex:commandButton value="Save"  action="{!Cancel}" />
                             <apex:commandButton value="Cancel" action="{!Cancel}" />


Please let us know if this will help you

Amit Chaudhary

Saturday 11 July 2015

Data Loading Tools

1) Jitterbit Data Loader for Salesforce   :- Fast, easy, no-coding integration for any SFDC Admin, Jitterbit Data Loader for Salesforce is a FREE data migration that enables Salesforce users to automate the import/export of data between flat files, databases, and Salesforce /

2) is simple, free, no download required app for Salesforce. 100% cloud solution to quickly import, export and delete data in

3) Informatica Cloud Data Loader :- Informatica Cloud Data Loader for Salesforce is a FREE data loading application that automates the import/export of Salesforce and data between databases and files.

3) WebSphere Cast Iron Data Loader  :- WebSphere Cast Iron Data Loader is a FREE cloud based integration solution that allows Salesforce users to import/exchange data between Salesforce and other data sources like flat files (csv),, and other Salesforce organizations in minutes

Wednesday 1 July 2015

How to Refresh a record in Console

Include JS in VF page
<apex:includeScript value="/support/console/26.0/integration.js"/>

Then use below link to open new record .
<A HREF="#" onClick="RefreshPrimaryTab();return false">         Click here to refresh </A>

Write below Java Script code in VF page
    <script type="text/javascript">
        function RefreshPrimaryTab() 
        var showTabId = function showTabId(result) 
            var tabId =;
            alert('Primary Tab IDs: primaryTabId ' + tabId );
            sforce.console.refreshPrimaryTabById(tabId , true, refreshSuccess);
        var refreshSuccess = function refreshSuccess(result) 
            //Report whether refreshing the primary tab was successful
            if (result.success == true) 
                alert('Primary tab refreshed successfully');
                alert('Primary did not refresh');

Imp Link :-