Technology Cares

Not Just another weblog

Archive for January, 2012

Salesforce Spring 12 Release Preview

Posted by Manish on January 30, 2012

Some of the features coming up in Spring 12:

1. Chatter Bookmarks, allowing you to bookmark your favorite, most useful Chatter posts

2. Chatter Favorites. Search for a specific string and save that Chatter search as a favorite.

3. Chatter Influence, which allows you to find the most influential people in your org.

4. Chatter Messenger is the GTalk, AIM, MS Communicator of Salesforce, allowing you to instantly communicate with anyone in your Salesforce organization.

5. Chatter v2.0 will be released in Spring 2012 for the iPad, bringing an all new UI that is easier to use.

6. Chatter Smart Search, bringing the most important items to the top and intelligently categorizing them.

7. Data.com is making it a lot easier to search for the exact types of contacts and leads that you would like to target with advanced Google-like filters.

8. Cross object workflows

9. Drag and drop schema builder

10. Siteforce is making the publishing of dynamic data a lot easier with some of their new features.

11. Siteforce Web to Object, Siteforce will allow out of the box building of externally facing web forms.

12. Radian6, the social monitoring package, is releasing new features that tie in with the Service Cloud to allow monitoring and tracking of Cases generated from the social networks.

13. Salesforce Analytics Edition, which is focusing more on the BI crowd.

14. Email to Case functionality has now been built into the Outlook Edition tool.

15. Salesforce Mobile for Android

16. Shared Tasks are an interesting new feature, but seem very useful, e.g. Send Holiday card to all Florida contacts. Why create 100 tasks when you can create 1.

17. Social Accounts, person accounts, and social leads are now available, just like the already existing Social Contacts.

18. Chatter Answers, the enabling of social self-service. Answers can come from knowledge articles, customer service agents, and a community of experts.

Of course, more on Release note

Posted in Uncategorized | Tagged: , | Leave a Comment »

Google Maps in Salesforce Page

Posted by Manish on January 16, 2012

Having implemented this before, I wanted to make a blog entry of this functionality that is very popular and often asked by the Salesforce users.
This blog entry is about adding google maps to the existing page layout of any objects in Salesforce. For example, showing address of the account in map or mapping the address of campaign, etc.
Here is how we start.
1. Go to Setup -> Customize -> Develop -> Pages and create a new Visualforce Page. Add following code:

<apex:page standardController="Account">

<head>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> 
<script type="text/javascript"> 

$(document).ready(function() {

  var myOptions = {
    zoom: 15,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    mapTypeControl: false
  }

  var map;
  var marker;

  var geocoder = new google.maps.Geocoder();
  var address = "{!Account.BillingStreet}, " + "{!Account.BillingCity}, " + "{!Account.BillingPostalCode}, " + "{!Account.BillingCountry}";

  var infowindow = new google.maps.InfoWindow({
    content: "<b>{!Account.Name}</b><br>{!Account.BillingStreet}<br>{!Account.BillingCity}, {!Account.BillingPostalCode}<br>{!Account.BillingCountry}"
  });

  geocoder.geocode( { address: address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK && results.length) {
      if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {

        //create map
        map = new google.maps.Map(document.getElementById("map"), myOptions);

        //center map
        map.setCenter(results[0].geometry.location);

        //create marker
        marker = new google.maps.Marker({
            position: results[0].geometry.location,
            map: map,
            title: "{!Account.Name}"
        });

        //add listeners
        google.maps.event.addListener(marker, 'click', function() {
          infowindow.open(map,marker);
        });
        google.maps.event.addListener(infowindow, 'closeclick', function() {
          map.setCenter(marker.getPosition()); 
        });

      }

    } else {
      $('#map').css({'height' : '15px'});
      $('#map').html("Oops! {!Account.Name}'s billing address could not be found, please make sure the address is correct.");
      resizeIframe();
    }
  });

  function resizeIframe() {
    var me = window.name;
    if (me) {
      var iframes = parent.document.getElementsByName(me);
      if (iframes && iframes.length == 1) {
        height = document.body.offsetHeight;
        iframes[0].style.height = height + "px";
      }
    }
  }

});
</script>

<style>
#map {
  font-family: Arial;
  font-size:12px;
  line-height:normal !important;
  height:250px;
  background:transparent;
}
</style>

</head>

<body>
<div id="map"></div> 
</body> 
</apex:page>

2. Add the Visualforce page on the Account page layout (in a single-column section) and set it’s height to be 250px.

Posted in Uncategorized | Tagged: , | Leave a Comment »