Salesforce Spring’12 release notes

Hurray …Spring’12 is here and some of the awesome features are

  • Online chat with salesforce users
  • Social Accounts and Contacts
  • Ability to write triggers on ContentDocument Object
  • Ability to share the service cloud urls
  • Getting rid of self-service portal for the new instances (you can make use of customer portal)
  • New analytic edition for exceptional reporting, bucketing and cross filters
  • Chatter for Android tablets – GA
  • Salesforce mobile SDK – GA
  • Cloud flow designer – GA
  • Ability to control the trigger invocation on a workflow field update
  • System log has been renamed as Developer Console and getting rid of old system log (ensuring developer to use the latest console)
  • Visualforce auto-completion in developer console
  • Newly introduced Force.com system overview page
  • By default test methods don’t have access to pre-existing data in the organization
  • New Visualforce component for chatter feed
  • And many more……

For complete details follow these links and don’t forget to register the webinar.

Spring’12 pre-release notes

Spring’12 pre-release signup

Spring’12 Webinar Registration

 

 

Posted in Uncategorized | 1 Comment

Wanted to know about Salesforce APIs?

Are you really go crazy sometimes like me to find out the differences between APIs in salesforce? If yes here are the answers for most of the questions.

http://blogs.developerforce.com/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html

A great article by Dianne with the help of Pat Patterson.

Posted in Apex, salesforce, Salesforce Tips & Tricks, Visualforce | 1 Comment

How to rename and move a file to new location when we use a command line data loader

I have been using command line data loader quite a long time but many times we wanted to rename the processed file by adding the current data and time and move it to a different location.

Here is the script for it

SET DAY=%DATE:~4,2%
SET MTH=%DATE:~7,2%
SET YR=%DATE:~10,4%
SET HR=%TIME:~0,2%
SET HR0=%TIME:~0,1%
IF “%HR0%”==” ” SET HR=0%TIME:~1,1%
SET MIN=%TIME:~3,2%
SET SEC=%TIME:~6,2%
SET MYDATE=%YR%%MTH%%DAY%-%HR%%MIN%%SEC
ren ..\csv\myFile.csv myFile_%MYDATE%.csv
move ..\csv\myFile_%MYDATE%.csv ..\csv\processed\myFile_%MYDATE%.csv

ren command is used to rename the file with current date time where as move command is used to move the file to a new folder

Note: ..\ means this is a relative location, or else you can even hard code the entire path 🙂

Posted in salesforce, Salesforce Tips & Tricks, Uncategorized | 1 Comment

Salesforce Winter’12 Release notes

Much awaited salesforce release notes for winter’12

https://na1.salesforce.com/help/doc/en/salesforce_winter12_release_notes.pdf

Here is a pre-release link too for winter’12

https://www.salesforce.com/form/signup/prerelease-winter12.jsp

Happy reading

Posted in Apex, salesforce, Visualforce | 5 Comments

Quick updates from Dreamforce 2011

Hello Folks

Here are the quick updates from dreamforce

  • Database.com – This is now GA and customers are started making use of database.com
  • Database.com – Data Residency Option(DRO) – In this you can keep data in your store rather than force.com
  • Chatter Now – New features in chatter which includes online chat, live meeting, videos, Approvals and many more
  • Contact– Contact record is automatically linked with facebook, twitter, linkedin
  • Data.com – Which is a new domain acquired by salesforce.com to work as Jigsaw
  • Salesforce touch – To give a common touch feeling across the applications which includes online, mobile, tablet, etc.
  • Chatter Service – Chatter with Service cloud
  • Radian 6 – Radian 6 is all set to work with salesforce, where in you can find the desired tags and their analysis/dashboards from social networks
  • Java on Heroku – Java programs now can run on Heroku
  • Java on VMForce – Java programs now can run on VMForce, which is a combination of VMWare and Salesforce
  • Now salesforce is not just a Salesforce it is a combination of
  • Salesforce
    Radian6
    Data
    Database.com
    Heroku
    Touch.salesforce.com
    DimDim

    Posted in Uncategorized | 2 Comments

    Workbench on Cloud

    Good news folks, now the workbench (beta) is available as a cloud service instead of installation headaches what an individual developer is having (especially who doesn’t know how PHP works)

    Here is the url for your test

    If you would like to integrate this workbench into your instance then here are the steps.

    1. Login to Salesforce
    2. Setup | Create | Tabs | Web Tabs | New
    3. Choose Tab Layout – Full page width is recommended
    4. Define Content and Display Properties
    5. * Tab Type: URL
      * Tab Label: Workbench
      * Tab Tab Style: Choose a style
      * Content Frame Height (pixels): Choose the maximum amount available for your screen (you may have to edit this value to find the correct value for your screen)

    6. Button or Link URL – replace “http://” with the url as “https:///workbench/login.php?serverUrl={!API_Partner_Server_URL_150}&sid={!API_Session_ID}”
    7. Save

    Enjoy with your new workbench interactions 🙂

    Posted in Apex, salesforce, Salesforce Tips & Tricks, Visualforce | 4 Comments

    Get ready to play with Winter’12

    Quick links for reference
    Winter’12 sandbox FAQs
    Sandbox Preview Window

    Posted in salesforce, Salesforce Tips & Tricks | Leave a comment

    Salesforce Blackberry Simulator

    1. Instructions for Software Download
      Download the Java Development Kit (SDK)
      JDK download

      Download and install the appropriate BlackBerry simulator
      BlackBerry Smartphone Simulators

      Download and install the BlackBerry Email and MDS Service Simulator Package
      MDS Simulator
      Note: you have to register for this

    2. Proxy Settings (only needed if you are working in a proxy environment)

      After your installation locate the file named as “rimpublic.property” and add the below lines under the HTTP Handler section.

      application.handler.http.proxyEnabled = true
      application.handler.http.proxyHost = proxy.company.com
      application.handler.http.proxyPort = proxyport
      application.handler.http.proxyUser = username
      application.handler.http.proxyPass = password
      

      Note: rimpublic.property file can be located at C:\Program Files\Research In Motion\BlackBerry Email and MDS Services Simulators 4.1.4\MDS\config directory.

    3. Editing the pin in the blackberry .bat file

      Locate the file named as 8900-ATT.bat (if you install 8900-ATT), scroll to the right and change the pin from 0x2100000A to 0x2500000A (any other value)
      Note: Pin value should not be repetitive.

    4. Install the Salesforce App

      To launch the MDS Simulator, click on Start –> All Programs –> Research in Motion –> BlackBerry Email and MDS Service Simulators –> MDS
      This will start a dos window that will run in the background.

      To launch the BlackBerry Simulator (using the example above), click on Start –> All Programs –> Research in Motion –> BlackBerry Smartphone Simulators 4.6.1 –> 4.6.1.319 –> 8900-ATT

      Open the BlackBerry Browser and type mobile.salesforce.com -> Highlight the download link and select “Get Link” from the menu -> Go to the downloads folder -> Click on the Salesforce icon and select “I accept” to continue with the installation

    Posted in Uncategorized | Leave a comment

    Force.com IDE / Eclipse Tips

  • Use CTRL+SPACE, for the code context assistance
  • Use CTRL+SHIFT+R, to open the file from package explorer qucikly (make sure you add a ‘*’ to your search)
  • Use a small icon as ‘-‘ in the package explorer to collapse all the projects
  • Use a Link with Editor () option in the package explorer to quickly locate the file in the package explorer from the open file
  • Use ALT+/ to show the correct variable name (type some letters and use this key)
  • Use CTRL+K to find the next occurrence of the selected text.
  • Use F12 to quickly activate the editor
  • Use CTRL+H to search the files
  • Use CTRL+L to navigate to the desired line number
  • Use CTRL+D to delete the entire line
  • Use CTRL+W to close the current window/editor
  • Use CTRL+F6 to switch to the next editor
  • Use ALT+F7 to open the sub tab in the editor like Metadata and Source
  • Use Window -> Preferences -> Text Editors -> Check the show line numbers checkbox to display the line numbers in the editor
  • Use CTRL+SHIFT+L to get the context menu help for all the available keyword shortcuts
  • Open the file -> Right Click -> Compare With -> Local History -> Select the Revision Time -> it will open a comparison window
  • Posted in Apex, Salesforce Tips & Tricks, Visualforce | Leave a comment

    Custom Multi-Select picklist field in Visualforce

    There are several scenarios, where in we might have used input field for getting multi-select picklist field. What if you can’t really use an input field, here is the example code which will solve these type of problems.

    Mutli-Select

    Page Code:

    <apex:page controller="multiselect">
        <apex:form >
            <apex:panelGrid columns="3" id="abcd">
                <apex:selectList id="sel1" value="{!leftselected}" multiselect="true" style="width:100px" size="5">
                    <apex:selectOptions value="{!unselectedvalues}" />
                </apex:selectList>
                    <apex:panelGroup >
                        <br/>
                        <apex:image value="{!$Resource.multiselected}">
                            <apex:actionSupport event="onclick" action="{!selectclick}" reRender="abcd"/>
                        </apex:image>
                        <br/><br/>
                        <apex:image value="{!$Resource.multiunselected}">
                            <apex:actionSupport event="onclick" action="{!unselectclick}" reRender="abcd"/>
                        </apex:image>
                    </apex:panelGroup>
                <apex:selectList id="sel2" value="{!rightselected}" multiselect="true" style="width:100px" size="5">
                    <apex:selectOptions value="{!SelectedValues}" />
                </apex:selectList>
            </apex:panelGrid>
        </apex:form>
    </apex:page>
    

    Controller Code:

    public class multiselect {
    
        Set<String> originalvalues = new Set<String>{'A','B','C','D','E','F','G'};
        Public List<string> leftselected{get;set;}
        Public List<string> rightselected{get;set;}
        Set<string> leftvalues = new Set<string>();
        Set<string> rightvalues = new Set<string>();
        
        public multiselect(){
            leftselected = new List<String>();
            rightselected = new List<String>();
            leftvalues.addAll(originalValues);
        }
        
        public PageReference selectclick(){
            rightselected.clear();
            for(String s : leftselected){
                leftvalues.remove(s);
                rightvalues.add(s);
            }
            return null;
        }
        
        public PageReference unselectclick(){
            leftselected.clear();
            for(String s : rightselected){
                rightvalues.remove(s);
                leftvalues.add(s);
            }
            return null;
        }
    
        public List<SelectOption> getunSelectedValues(){
            List<SelectOption> options = new List<SelectOption>();
            List<string> tempList = new List<String>();
            tempList.addAll(leftvalues);
            tempList.sort();
            for(string s : tempList)
                options.add(new SelectOption(s,s));
            return options;
        }
    
        public List<SelectOption> getSelectedValues(){
            List<SelectOption> options1 = new List<SelectOption>();
            List<string> tempList = new List<String>();
            tempList.addAll(rightvalues);
            tempList.sort();
            for(String s : tempList)
                options1.add(new SelectOption(s,s));
            return options1;
        }
    }
    

    Happy Coding and enjoy the custom multi-select picklist field

    Note: This code can be further optimized 🙂

    Links to the images:
    multiselected
    multiunselected

    Posted in Apex, Salesforce Tips & Tricks, Visualforce | 17 Comments