SKUID-Scalable Kit for User Interface Development
Jan10

SKUID-Scalable Kit for User Interface Development

SKUID SKUID has always been my favourite since the first time I saw this in Dreamforce 2014. My first interaction was with their team on Dreamforce booth and the after understanding its capabilites I was amazed! SKUID is set of tools that allow you to change almost any element of your Salesforce User Interface, quickly and easily. We can quickly implement any changes as per suggested by your team, across your org and even in Production. It is basically used to build the UI to have a look on the data your company needs. STORY: Salesforce connected Rich (Rich Slack, CFMO of Chrysalis and CEO of Meridian Meds) with a private developer who would charge $300,000 – $500,000 to build out their user interface. It was a non-starter. Rich decided to kill the Salesforce project and hire a team of developers to create their own platform. However, the team hit many roadblocks. Rich realized that Salesforce could do what he needed if he could figure out a way to overcome the gap of user interface. That’s when he found Skuid. Within 2 days, Rich had re-skinned the user interface of his app within Salesforce. He rebuilt his entire system during his nights and weekends in four months.  Let’s get Started with SKUID: Compose your new page from Skuid Central tab in your Salesforce Org Connect your Salesforce objects and external data through models present in Skuid. For each MODEL, choose the standard and custom fields from your Salesforce objects that you want to include in your page, and can even set criteria for the records to get display on your page. You can create as many model as needed. The only thing to know is that they will be loaded the way they are listed. For each model we have: Fields: Fields refer to the fields from the object which we want to show in our page. Conditions: They apply criteria for the records which are to be shown onto the page. Actions: They help us to specify the actions which we want our page to perform after some event. We have two properties for Model which are Basic & Advanced. Basic properties let you define the model Id, data source type, SObject name, model behaviour, number of pages to be displayed etc. Advance properties let you have a look on cloning the data, Query Deleted, Update Salesforce Recently Viewed Info etc. Skuid provides you with pre-built components which can be used to create your own page. Also you can create your own components. There is only the need to drag and drop those pre-built components and you can...

Read More
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
Wave Dashboards in Lightning Pages
Nov25

Wave Dashboards in Lightning Pages

A Wave Dashboard is a collection of widgets that work together to tell a data story from multiple angles. Depending on what you want the dashboard to show or how to behave, you can add different widgets, such as key performance indicators, charts, tables, filters, and images.Embedding Wave Analytics Dashboard component to a Lightning homepage or record page can provide interactive visualization of your data. It is currently available in Lightning experience only. It offers additional features to help you build Dashboards more quickly and easily. Use a template to create a Dashboard with a predefined layout. Create customized layouts to optimize the display of a Dashboard on different types of devices, like mobile phones, tablets, and desktops. Use the wizards to quickly build widgets. Use drag-and-drop, snap-to-grid, and browser reflow to effortlessly add, position, and align widgets in a Dashboard. To add a Dashboard to your Lightning Page follow the steps below:   Select Wave Dashboard Component in the Lightning App Builder From the Dashboard drop-down list, select the Dashboard to display From the layout drop-down list, select the type of screen where your Lightning page will be viewed Configure following attributes of the Wave Analytics Dashboard:  Show Sharing Icon option lets you include Share icon on the Dashboard. If the icon is present, users can click to open the Share dialog, where they can post to Chatter and download images and data Show Title checkbox gives you control over the visibility of the Dashboard title Open Links in New Windows attribute, you can specify where links from the Dashboards to other assets are opened Hide On Error checkbox gives you control over whether the Wave Analytics Dashboard appears if there is an error Filter attribute, you can use JSON to filter dataset fields at run...

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
Salesforce Code Move Strategy
Aug09

Salesforce Code Move Strategy

Why sometimes a few lines of code changes take several days of deployment. Find the answers and Code Move Strategy:- Recently In one of my project I faced the following situation: We did a code change in trigger. Changed a string value from “Demo” to “Trial”. The code change hardy took 1 minutes. Client was aware of the changes and  time it will take so we estimated the work as 2 hour including code changes, analysis of its impact and deployment. When the developer finished deploying the code changes it took him 2 days (16+ Man-hours). Yes it is a surprise. Now let me list out the problems he faced.   Code coverage of the existing trigger was 12% (Our Company Best Practice is 85%) Code coverage of overall production org was less than 75%. Yes this is hard to believe but this do happen when we push things in production without code coverage. Existing test classes were failing in production. Trigger in production was different than in Sandbox. Yes this is also possible when we have multiple sandboxes and people do code overrides as they are competing against each others. Deployment had a narrow slot of 2 hours during which end client were not working. Batch Jobs working on the same object were preventing the Trigger to deploy. We gave our best as a team and came up with the following strategy which changed our entire company’s estimation and requirement analysis process. Code Move Strategy: Step 1: Check the existing production code coverage by “Run All Test”. Step 2: Lookout for test class failures if any. Step 3: List out the Batch jobs running in production. Step 4: Compare the code between production and sandbox before working on it. If any differences found report it to your end Client/Manager. Step 5: Make sure if you are deploying an apex code its code coverage should be above 85%. Step 6: Use Changeset for small size deployment with less components. Keep the changeset names in a well defined order. Step 7: Use Eclipse or Ant Migration tool for deployment with many components.If you have the privilege of Full copy sandbox use it for trial deployment and go live. Full copy sandbox gives you an advantage of less risk more effort based deployment process. Step 8: Deactivate the necessary batch jobs and validation rules before deployment. Step 9: Make sure the deployment is in the right time slot when end users are not working or keep the team informed for any surprises that may come while deployment or after that. Step 10: Validate and Deploy. Reactivate the Jobs, VRs etc. Step...

Read More
Code Reprository Management
Jul21

Code Reprository Management

This blog is for an Intermediate developer who is planning to do Salesforce backup and code management using Git. Unlike Java Salesforce does not have a code versioning system. I am going to demonstrate how we can use Git and Eclipse(Local code base) to have this code management in place. Step 1 : We have a Requirement to create a new Lead source as Web2. Developer have done some changes based upon a requirement and have marked the ticket #227(Hypothetical) as done in project management tool.Quality Analyst(QA)  got this ticket #277(Hypothetical) .To test in order to test the ticket she created lead and set the value of Lead source as ‘Web2’ as we were told to do so. Screenshot below: Step 2 : QA will ‘retrieve’ code from Sandbox using Eclipse Force.com IDE tool to do the task. Next QA will retrieve the class from sandbox in order to do that go to eclipse click File > New > Force.com Project Now Type a project name then type your organization’s Username and Password and if you have the security token you can add it too in the next field but if you don’t have the security token you can create one from your org or you can whitelist your IP to skip the security token part. Fill the correct details then click Next. Next step is to select the metadata you want to retrieve from the Sandbox and then click OK. You can now see the metadata which you have retrieved in your local system. Question 3 : Describes the steps to ‘commit’ to local repository, what tools did you use?                                                                                  And Question 4 : Describes the steps to ‘push’ to remote  repository,what tools did you use? Solution : We used Eclipse to do this task as well  What we did to implement the logic: Step 1 : First of all we have installed Git plugin for eclipse for deployment and retrieval process. To do so we have followed these following steps: 1.1. In Eclipse(any version), Go to help > install new software. Click on Add New button name the Repository(any) and copy and paste this url in the location field url : http://download.eclipse.org/egit/updates Next Install the available softwares. 1.2. Now go to Window > Perspective > Open Perspective > Other  or Click on perspective link and select Git from the available list. Than click Clone Repository button. 1.3....

Read More
Eclipse IDE
Jun15

Eclipse IDE

I am writing this blog out of my experience to share the key details of the different IDEs I have used while programming in Force.com environment. This might help an experienced or newbie developer in choosing the right IDE to code.My favorite and most probably every programmers most loved IDE. Eclipse is famous as a Java Integrated Development Environment (IDE). Salesforce You can easily combine language support and other features into any of our default packages, and the Eclipse marketplace allows for virtually unlimited customization and extension. Eclipse give a feel of traditional desktop based programming from developer end and in backend it saves all in Salesforce Cloud. Eclipse for Salesforce: To code apex in eclipse you have to first install force.com IDE in your eclipse in order to sync your local server with salesforce server. What force.com IDE can do : Customizable Folders Structure: No more limitations for files or folders structures. Now developers can organize them in whatever way they want. Apex Code Completion: Save time, improve the coding velocity, and avoid making mistakes with Code Completion functionality for Apex. Anonymous Apex Execution: Test new solutions, debug your code or work with your organization using the Anonymous Apex with all of the code editing features you’ve got used to. Quick Search of a Current Selection: Once you select any text in your code all its occurrences within the document will be highlighted and marked on the scrollbar automatically. Debug Logs: When debugging code you usually execute Anonymous Apex, perform some actions in the UI or start scheduled jobs which then produce lots of logs for you to go through. In most cases your actions would provide you whatever information you need pretty easily but sometimes you need only some specific logs – with very long duration, very small or very big logs, failed or succeeded logs and so on.                         Find and replace Find, preview, and replace text as you type in a file or across all your projects. Latest Features: Execute Apex Test Suites Enjoy Optimized Test Execution See Apex Test Results More Quickly Enabled code­ coverage highlighting in Apex classes Provided whitelist filtering for user and request­type debugging in the Apex Debugger Share Apex Debugger licenses among your sandbox orgs Enabled Eclipse’s Java development tools (JDT) icons for Apex variables in the Apex Debugger How To Install : These instructions show you how to install the Force.com IDE into your existing Eclipse distribution or upgrade from a previous version. Prerequisites: To install Force.com IDE you must have these requirements filled: 1. Java SE Development Kit (JDK) must be installed in the system in order to install Eclipse.(Download JDK) 2....

Read More