5 things about Salesforce Certification
Jan03

5 things about Salesforce Certification

This blog is for the Developers who wants to get a Salesforce Developer I Certification . What is Salesforce Certification? Why is it so important for the developers seeking a career in Salesforce? Salesforce certification is vital to the salesforce career path as it differentiates you from other developers, makes you an expert in your field. This Certificate is provided by salesforce.com where people demonstrate and prove their technical Skills in different  areas of Salesforce. It’s a damn good certification, if you are thinking about a career in Salesforce, by enhancing your skills and expertise in respective fields. It is very easy to get hired in an organization with  a salesforce certification in hand. You need to follow these steps  to enroll  for examination : First you have to create your webassessor Account on             https://www.webassessor.com/wa.do?page=createAccount branding=SALESFORCE Secondly Register and schedule your exam Five  things you must know while preparing for salesforce certification:-  Course Content  and their  weightage -: The Salesforce Certified Platform Developer I exam measures a candidate’s knowledge and skills related to the objectives listed below. A candidate should have hands-on experience of developing custom applications on the Force.com platform and have demonstrated the application of each of the features/functions below. 2. Prepare each topic with written practice of programs. Exploring it on trailhead will be a  great start. It will provide huge knowledge for practical implementation. In different areas. Below is the  link to access trailhead: https://trailhead.salesforce.com/ 3. Go through /Solve previous years certification:- Preparing from previous year question papers is always a good strategy to cover frequently asked topics in a short span of time.  4. Practice as many Mock test papers as possible once you think you have a good command on Salesforce syllabus. Mock test papers are available on various websites for free where you can practice them. Do register yourself  if required (as asked by some of the websites)  5. And last but not least, be confident and relaxed while writing the exam and remember the best way to gain confidence is to do more and more practice. According to my exam experience every aspirant must prepare well in the following topics as most of the questions I faced in the exam were from these topics : Validation Rule Workflow Rule Process Builder Object Relationships So all the best guys for exam. The exam is simple and easy. All you need is to do...

Read More
Gravity Forms and Salesforce Integrations
Dec12

Gravity Forms and Salesforce Integrations

Gravity forms are generally the WordPress plugins to create a contact form. It allows site owners to create and gather the information. GRAVITY FORMS + SALESFORCE It forms a great combination to gather the information and add leads to Salesforce automatically. It helps making CRM more easy and simple. To set up it takes few minutes and provide you a way to collect information with much simplicity.  Gravity forms are much more interactive and provides you with easy way to add fields, making them mandatory, email etc. If you already don’t have this plugin installed then get it and make your work much easier. WEB FORMS to SALESFORCE We have several apps which does somthing similar on the context of getting your data drom a Web Form into Salesforce. Ex:- Web2Anything:- http://developer.force.com/codeshare/projectpage?id=a0630000003JS9MAAW formyoula:- https://formyoula.squarespace.com/ Salesforce.com Sites Pages:- You will have to custom build the vfpage with form and make it a publicly accessible URL. INTEGRATION To integrate your Gravity Forms with Salesforce follow the steps below: Go to setup in your Salesforce Org. and type web-to-lead in Quick Find box.                Generate new form. The redirect URL should be the URL where you want your page to be redirected after the submission of the form.   Select the fields you require in your Gravity Form and save the HTML code generated through it.               SYNC YOUR WEB-TO-LEAD FORM WITH GRAVITY FORMS Create your web-to-lead form as described above Look for the Salesforce Add-on tab(Form<Settings) and select Integration Method as Web-to-Lead. Update Settings.   Create your Gravity Form in your WordPress Site.                Add the fields you used while creating your web-to-lead form Save the form. Click the Gravity Form’s name and lookup for the confirmation tab under the settings. Select confirmation tab to redirect Redirect URL should be the URL you got while generating the web-to-lead form.     The URL should not include the “?encoding=UTF-8” since Gravity form do it itself on start of the query string. Check “Pass Field Data Via Query String” Your screen should look like this:       NOTE:  If you are trying to work in your sandbox then do change the Redirect URL to test.salesforce.com instead of www.salesforce.com since web-to-lead form generates form working in Production. Remember you removed “?encoding=UTF-8” from the redirect URL, now make this the first line of your Query String. Start with your oid and retURL to process our Query string. Each value should use “&” in between.   Now it’s time to map your salesforce fields to that of the gravity form you created. Build your query string in the following format:                field_name=field_value&2nd_field_name=2nd_field_value You can take help from...

Read More
Salesforce Ant Migration
Sep20

Salesforce Ant Migration

Ant Migration tool is used to Create and Fetch Metadata to and from an organisation.  It’s a  command-line utility by which one can upload and download Metadata components. Benefits Its very useful for creating repetitive deployment or may be a large number of components just by executing a command in an command line interface. Useful for uploading test environment with a lot of configuration settings. Manually creating Fields, Objects may take a huge amount of time when you create them by clicking with the salesforce interface. These fields can be created with one command in the Command line interface and using Package.xml file in which you specify the information about all the fields. The Name of the components we can Deploy or retrieve are as follows: Custom Fields. Objects. Workflow rules. Apex Triggers. Apex Class. Visualforce Pages. Etc. The Whole list is mentioned in this link: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm   Installation Download Force.com migration tool from your salesforce organisation. Go to Setup. Type “Tool” and Click on Force.com Migration tool & Toolkits. Go to the Following Link for downloading Ant: https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_36.0.zip Add the bin directory to your path. Set the ANT_HOME environment variable to the directory where you installed Ant. Set the JAVA_HOME environment variable to the directory where the JDK is installed. Run command in Command line Interface:   “ant -version” to check the version and confirm the installation. Usage Create three Files: Package.xml – Which consists the specifications for the components. Package.xml <?xml version=”1.0″ encoding=”UTF-8″?> <Package xmlns=”http://soap.sforce.com/2006/04/metadata”>    <types>        <members>*</members>        <name>CustomObject</name>    </types>    <version>37.0</version> </Package> Build.properties – Which consists the Credentials of the salesforce Organisation to & from which you want to Upload/Download. Build.properties sf.usernameDownload = Sf.User@Name.com sf.passwordDownload = Password122   sf.usernameUpload = Sf.User@Name.com sf.passwordUpload = aasfde@12131QV4cWJnmdflgBRdXsWznzohG sf.serverurlDownload = https://login.salesforce.com sf.serverurlUpload = https://login.salesforce.com sf.maxPoll = 100 Note: You have to mention Security token at the end of the password of the Org in which you want to Upload the metadata.   Build.xml – This file is used to set the attributes which will be used in the Command line interface such as “Project Name”,”Property File”,”retrieveTarget folder( where Downloaded metadata info will be saved)”,”unpackaged(Package.xml file)”. Build.xml <project name=”ANT Migration” default=”test” basedir=”.” xmlns:sf=”antlib:com.salesforce”>   <property file=”build.properties” /> <property environment=”env” /> <target name=”retrieve”> <mkdir dir=”Retrieve” /> <sf:retrieve username=”${sf.usernameDownload}” password=”${sf.passwordDownload}” serverurl=”${sf.serverurlDownload}” retrieveTarget=”Retrieve” unpackaged=”unpackaged/package.xml” pollWaitMillis=”10000″ maxPoll=”100″ /> </target> <target name=”upload”> <sf:deploy purgeOnDelete=”true” username=”${sf.usernameUpload}” password=”${sf.passwordUpload}” serverurl=”${sf.serverurlUpload}” deployroot=”Retrieve” pollWaitMillis=”10000″ maxPoll=”100″ /> </target> </project> Go to the path where you stored these files and then Run commands as follows: Upload(Which you mentioned in your build.xml file as target) – For uploading components you mentioned in the Package.xml file. Retrieve– For downloading the Components information you mentioned in the package.xml file...

Read More
Salesforce Google Map Integration
Sep02

Salesforce Google Map Integration

Google Map Integration Integrating google maps into Salesforce                         Description of the requirement: Starting with description of the Project we have worked upon, there’s an app we created for searching and showing Account’s location on the Map and knowing a route map from one location to another location via some locations(Checkpoints).                            Solution we came with: For the requirement we used Google maps api which is in Javascript format. There are some predefined javascript functions used in the Google map api. We used Google Maps library whoz source is coming from a link i.e., “https://maps.google.com/maps/api/”.                                 There are several Javascript functions we used here which are as follows: Function to get the current location of the User by using the browser’s location. Get the current location of the User by using the browser’s location:                  var geocoder;            var map;            function initialize(){                geocoder = new google.maps.Geocoder();                    console.log(lon+’***latlon–‘+lat );                var latlng = new google.maps.LatLng(lat, lon);                console.log(‘***latlon–‘+latlng);                var myOptions = {                  zoom: 12,                  center: latlng,                  mapTypeId: ‘roadmap’ /* ,                  mapTypeId: google.maps.MapTypeId.TERRAIN */                }                                         map = new google.maps.Map(document.getElementById(“map”), myOptions);   Here we used “google.maps.Geocoder();” to access Google Maps API geocoding service.    We created an apex class method which will take Address of the Account as a string and will return a Geolocation for that address i.e., in Latitude and longitude of the string  address passed in the function as a parameter to it.   Suppose a string will be as shown below: public Account accObj{get;set;} // This is a getter setter method contains Account record. String address = accObj.BillingStreet+accObj.BillingCity+accObj.BillingPostalCode+accObj.BillingCountry;   Now we used the below method to get the Latitude & Longitude: Get the Latitude & Longitude: public static String getLatitudeLongitude(String address){        String location=”;         try{                Double latitude = null;                Double longitude = null;                            Http httpGetRequest = new Http();                HttpRequest httpReq = new HttpRequest();                system.debug(‘******Address—‘+address);                address=address.replaceAll(‘ ‘,’+’);                address = address.replace(‘\r\n’, ‘ ‘);                        address = address.replace(‘\n’, ‘ ‘);                        address = address.replace(‘\r’, ‘ ‘);                        system.debug(‘******After       Address—‘+address);       httpReq.setEndpoint(‘https://maps.googleapis.com/maps/api/geocode/json?key=’+key+’&address=’ +address + ‘&sensor=false’);                                                                                            //Authentication to google api            httpReq.setMethod(‘GET’);            httpReq.setTimeout(6000);            HttpResponse httpResponseAddress = httpGetRequest.send(httpReq);                system.debug(‘res body: ‘ + httpResponseAddress.getBody());                JSONParser parser = JSON.createParser(httpResponseAddress.getBody());                                    while...

Read More
Salesforce Metadata API
Aug23

Salesforce Metadata API

What is Metadata ? First you need to understand data. What is data in context with Salesforce. Data is anything which is stored in a database like records related to Contacts,  Accounts, Leads Opportunity etc. Metadata : Metadata can be defined as the set of data about another data. i.e., Configuration/Code/Logic of the underlying structure which is used to store the data (Records). Another definition is you can say the database structure in which you will be saving the data.  Metadata Api for Salesforce can do several things programmatically. Some of the tasks are mentioned below: You can read, create, update, delete following components in a Salesforce organization. Custom Objects/Fields. Visualforce pages. Page Layouts. Validation rules. Apex. Workflows. Approval processes. Profiles. Reports etc. Security.                   You can configure a Salesforce organization just by running a piece of code. It means that you can create Objects,Fields,Validation,Workflows, Profiles, Reports for a particular client organization just by running the piece of code so that you need not do all the customisation settings manually which will consume time if you have to do that several times for different clients for the same configuration settings. You can also take the backup of your organization customisation settings just by fetching the metadata WSDL from your Salesforce org. For this You need to click setup>type API-Click on API >Click Generate metadata WSDL and download the xml file. There are two types of Metadata Api calls: Synchronous – This will give the result immediately as soon as you call a method. Asynchronous – This will not give result immediately, it will take time. Asynchronous : There are four types of methods which we can use: Create();   Update(); Upsert(); Delete(); We will discuss only for synchronous method. Synchronous : There are five types of methods which we can use: (i) createMetadata(); saveResult[] = metadataConnection.createMetadata(Metadata[] metadata); (ii) readMetadata(); readResult = metadataConnection.readMetadata(string metadataType, string[] fullNames); (iii)updateMetadata(); saveResult[] = metadataConnection.updateMetadata(Metadata[] metadata); (iv)upsertMetadata(); spsertResult[] = metadataConnection.upsertMetadata(Metadata[] metadata); (v)deleteMetadata(); seleteResult[] = metadataConnection.delete(string metadataType, string[] fullNames); All these classes saveResult, readResult, upsertResult, deleteResult comes from a main class that is MetadataService.cls in which all the relevant methods are present to function Read, Create, Update, Upsert or Delete properly. Now I will demonstrate how to create Custom components. You can use following methods to create components: (A) To Create a Custom Object: You need to add this code to your class which you are using and call this method via class name to create the object. Note: MetadataService is also a class which have several methods and used in these methods. Create a Custom Object: public static void createObject() {  ...

Read More