How to be an expert and get your dream job in salesforce in less than 5 months

Salesforce is a hot product and has changed a lot in last few years. Back in 2010, when I started working on this platform, very few people in India were aware about it. But now, almost every IT company knows about Salesforce and want to have some good resources on the same technology. Also, since new customers are joining Salesforce every single day, that means demands for Salesforce Admin, Developer & consultant are increasing.
It is not very difficult to become an expert in salesforce, but it requires some patience and dedication. In this blog, I am going to share few steps to become a salesforce expert, which I have learnt from my experience of 7 years in salesforce. If you follow these steps, you will get a good paying job in salesforce technology.

1)      Register a DEV ORG for your practice
Anyone interested in learning salesforce must have a DEV account in order to play around the platform. This is life-time free of cost salesforce instance that allows you to learn and practice things.
With this org, you can do following things:
a)       Build new features and functionalities (like Custom app, fields, validation rules, security settings)
b)      Create and execute APEX Code & visualforce pages (If you are developer)
c)       Access the salesforce community (http://developer.force.com/)  to get hands on never-ending supply of salesforce documentations, produced by salesforce & the community.
You can also register for various salesforce training sessions using this credentials in this community.
d)      Create packages for your code for appexhange.
e)      Installing packages created by other companies from appexchange.
f)        And much more…

2)      Learn, Practice, Learn, Practice….



Once your dev account is created, its time to get started on practicing your learnings on this account. There are various resources that can help to get started on learning salesforce, few of them are:
a)       Salesforce Fundamental PDF This pdf is very good starting point to learn salesforce. This pdf will help you create a Recruiting app with the help of examples and easy walkthroughs.  Make sure you implement all the exercises that you learn in this pdf.
b)      Salesforce Trailhead – trailhead.salesforce.com is an interactive learning tool developed & maintained by Salesforce. Its very similar to Code Academy in that it has modules  you’ll work through using your admin org. Along the way, you’ll learn the basics of Salesforce while earning points and badges. It’s phenomenal (and totally free).
c)       Salesforce YouTube Channel— This is also a very great resource of learning salesforce from various videos uploaded by Salesforce.

3)      Join a meetup group and start networking – There are over 200 user groups around the world that allows you to meet, learn and make some networking with other local salesforce talent. Try to meet other people and learn from their experiences. Bigger network you have, easier it would be to get a job.

4)      Be Active on social networking Sites – Salesforce groups are there in almost every networking website like Linkedin or Facebook. Be a member of them to keep updated on what is happening, what new is coming. Also become friends with various salesforce talent around the globe. Follow people and blogs that are interesting to you. I have learned a lot from following blogs from various salesforce experts like Bob Buzzard and Ankit Arora.

5)      Volunteer – Once you get hold of salesforce customizations(for developers) and configurations, I would advise you to be part of salesforce developer forums and start contributing in them. Some of the good salesforce communities are:
a)      Salesforce Developer forums : https://developer.salesforce.com/forums/
b)      Stackexchange : http://salesforce.stackexchange.com/
Be part of these forums. See what are the issues other people are getting. Try to help them with replying the solutions to them. That way, you will learn real-time issues that any book can not teach you.

I hope this help you guys to get started on salesforce. Happy learning. I am looking forward to meet you guys in salesforce communities. Any questions you have, feel free to reach me at rohit@applikontech.com and I will try my best to answer those questions as soon as possible.



Use case for Salesforce Geocodes introduced in Summer'16

In my last post, i shared with you guys about the new geocodes fields introduced by salesforce in Summer'16 release for few standard address fields on Account, Lead, & Contacts.

In this post, i am going to share one use case with you. Had this feature was there back in 2015, when i was working with a client on a mobile app for sales users to help them identify few nearby clients to their existing location, that would have been much easier for me. We had to use google location apis to get co-ordinates of address fields and then select the shortest few clients and display them on the mobile app of the sales team. 

But now, since this new fields are there, this has become a very easy task.

I am gonna share a code snippet with you to display nearest 5 clients to current location of a user.

Here is the agenda of the code:
1) Get users's current location co-ordinates (I am going to use JS for that)
2) Using these co-ordinates to SOQL distance query to get nearest accounts and display them on page


1) get user's current location co-ordinates
I am using JS's navigator library to get geocodes of the user and then passing it to the controller using actionFunction. You can use JS remoting as well to pass the data and get the records

2) Using these co-ordinates to SOQL distance query to get nearest accounts and display them on page

Salesforce distance calculation SOQLs allows you to get records based on the distance from given co-ordinates


1
2
3
4
5
  string query='SELECT Name, billingAddress,billingCity FROM Account WHERE DISTANCE(billingAddress, GEOLOCATION(';
    query+=decimal.valueof(lat)+',';
    query+=decimal.valueof(lon)+'), \'mi\') < 20';
   
        acclist = (list)database.query(query);



Here is the entire code for this;

VF PAGE:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<apex:page controller="MyLocationCtrl" showHeader="false">
   
<html>
<head>
   
    <title>Geocoding Page</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script>
  function getLocation() {
      if (navigator.geolocation) {
          navigator.geolocation.getCurrentPosition(savePosition, positionError, {timeout:10000});
      } else {
          //Geolocation is not supported by this browser
      }
  }

  // handle the error here
  function positionError(error) {
      var errorCode = error.code;
      var message = error.message;

      alert(message);
  }

  function savePosition(position) {
      getAccounts(position.coords.latitude,position.coords.longitude);
  }
  </script>
</head>
<body> <button onclick="getLocation();">Get Nearest 5 Location</button>
    <apex:form >
   
    
    <apex:actionFunction name="getAccounts" rerender="op1" action="{!getaccounts}">
        <apex:param assignTo="{!lat}" value="" name="lat" />
         <apex:param assignTo="{!lon}" value="" name="lon" />
    </apex:actionFunction>
        <apex:outputPanel id="op1">
        <apex:pageBlock>
        <apex:pageBlockTable value="{!acclist}" var="acc">
        <apex:column value="{!acc.id}"/>
            <apex:column value="{!acc.billingCity}" />
       </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:outputPanel>
        </apex:form>
</body>
</html>
    
</apex:page>


Contoller:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
public class MyLocationCtrl {
    public string lat{get;set;} //stores lat
    public string lon{get;set;} //stores lon
    public list<Account> acclist {get;set;} //returns account list
    
    
    public void getAccounts(){
    string query='SELECT Name, billingAddress,billingCity FROM Account WHERE DISTANCE(billingAddress, GEOLOCATION(';
    query+=decimal.valueof(lat)+',';
    query+=decimal.valueof(lon)+'), \'mi\') < 20';
   
        acclist = (list<account>)database.query(query);
       
    }

}
Output:



Using Salesforce geocodes feature in Summer'16 release

In Summer'16 release, salesforce has rolled out much-awaited geocodes feature that allows users to access latitude & longitude co-ordinates on standard addresses fields in few of salesforce objects. Supported objects are : Accounts, Contacts & Leads.



Now, all the existing and new records will have this lat and lon fields autopopulated based on the address provided there. These fields can not be added to layout directly. you would need to create formula to access their values on the page.

Steps to create formula : 
1) Create a new formula field of type Number with 4 decimal places
2) In the formula editor, select fields and select BillingAddressLatitude field to view Billing Address Latitude co-ordinates. 


Likewise, other formula fields can be created to capture longitude and geocodeaccuracy fields.

How do you intend to use these new fields? Share your thoughts



Making external images work in salesforce visualforce pages renderas="pdf"

When you use some external images url in a visualforce page that is being rendered as pdf, you will notice that external images are not getting displayed on the page, instead a "No-image" icon gets displayed.






Solution:
Salesforce PDF generation engine that runs in the background, runs in same security settings as Apex, which means you have to whitelist the image hosting site by going to setup->Security Controls ->Remote site settings


Refresh the page, and here you go!!


May the Sales-FORCE be with you!!


Using field sets to display data in VF page


This is one of the first methods to display dynamic columns/fields on a visualforce page as specified in my previous blogpost.

As you might be aware that almost all standard/custom objects supports field sets. Field sets are introduced to give flexibility to a user/Admin to change the fields that are being displayed in a visualforce page by themselves, without touching the code. This also helps in case you are offering a vf page as part of managed package. Whoever install the package, can control fields-to-be-displayed using field sets used in the vf page.

In the example below, i am going to create a vf page on Account object.
Here is all you need for this:

1) Field set on Account. I will call it VFPAGECOLUMNS. you can create it by going to set->Customize->Account->FieldSets


2) Access this field set from your VF page by using. In my case i am using this inside <Apex:repeat> to iterate each field in the field set. 

{!$ObjectType.Account.fieldSets.VFPageColumns}

Here is the complete code:

<apex:page standardcontroller="Account">
    <apex:form>
    <apex:pageblock title="Dynamic columns in Visualforce Page with FieldSet">
        <apex:pageblocksection>
            <apex:repeat value="{!$ObjectType.Account.fieldSets.VFPageColumns}" var="accField">
                    <apex:inputfield value="{!Account[accField]}">
                    </apex:inputfield></apex:repeat>
            </apex:pageblocksection>
        </apex:pageblock>
    </apex:form>

</apex:page>


And the output looks like following. Also. you can also set fields to required in the layout from the field set by double clicking on any field and set it to Required

Showing dynamic fields/columns in VisualForce Page

A lot of times, we choose visualforce pages to override standard view/edit views in salesforce. But one of the drawbacks in choosing this approach is that the client has to rely on a developer to make any changes in the field being displayed on the page or to add a new field in the layout of the visualforce page. 

There are several approach by which we can go for visualforce pages with still having the flexibility for the client or admin to change the fields by themselves without even changing the code. Here are few methods:

1) Using Field Sets
2) Using Reports
3) Using ListViews

Share in comments if you are aware of any other methods to achieve the same.