Thursday 29 October 2015

“A commit in Time, Saves Hours Nine!”


“Version Control”


The ultimate boon for software engineers! Why? Suppose you have a demo scheduled with your client. You are a hardworking programmer, just like me, and you successfully complete the functionality well in time for the demo. Everything is fine, dandy! Until you decide to play with the code, doing a code review yourself, beautifying and rectifying the bugs within. Minutes before the demo and you finish the code review fixes as well; kudos, good going mate!!! Now you get a cup of coffee and rehearse the demo, already playing how smoothly it would go. Here comes your worst nightmare live in action, the code has broken! In reality, the rectification process ended up being a disaster and that too minutes before the demo! Say goodbye to coffee and peace, you will be left scratching your head to find out what went wrong! Safe to say that your client ain’t going to be too gung-ho about it!

This is where Version Control comes to your rescue, like a knight in shining armor, just like those superhero movies! With version control, incremental versions of the files are stored, so that in times of desperate measures such as this, you can quickly switch to one of the previous versions and turn everything back to normal; almost like a piece of magic!!! And the magic does not stop here. With advanced version control tools such as Github, BitBucket and Apache Subversion (SVN), you can even sync your local files with the cloud so that you can quickly access them even if you are on the go or do not have access to your machine. Amazing, isn’t it?

One of the most popular methods of version control is Github. In a few simple steps, I’ll show you how you can set-up version control using Github and say goodbye to all last minute glitches.

What you need

  1. A Github account, which you can create for free at https://github.com/join
  2.  Git shell which you can download and install on your machine from https://git-scm.com/downloads

Let’s get it rolling!

Step 1: Initializing a Repository

A repository or simply a repo is a common storage place for all the documents in the version control system. It maintains the version for every file that you have added to it.

To initialize the repository, you need to use the git init command.


This would initialize an empty repository in the folder you are currently working on.

Step 2: Adding files to the Repository

The next step is to add the files to the repository in order to maintain versions. It is necessary to specify the files whose versions you need to maintain to git. You need to use the git add * command for the same. The ‘*’ specifies that every file in the current folder is to be added to the repo. You can also mention the names of the files that you want to keep a track of. Suppose you want to track the file Constants.cls only, the command would now need to say git add Constants.cls

You can also view the status of the files in the repo by running the git status command.


Github has its own way of recording the changes to the files. Once you have added the files to track, it stores the files in a staging area where all the changes to the file are recorded as snapshots.
Now that you have successfully added files to your repository, the version control system is up and running and already has started tracking the changes you save to your files.

Step 3: Committing the changes

What is the use of only tracking the changes to the file and not saving them? Committing the changes ensures that every change that you did prior to the commit has been recorded and stored on the version control system.

If you are likely to make mistakes, committing your files is the way to stay safe.

git commit -m <commit_message> command does the trick for you. The arguments -m <commit_message> are used to record the commit messages. Commit messages are a way to document the changes done in the current version of the files.


As a cardinal rule, it is always a good practice to add meaningful commit messages. In case you need to revert back to a previous version of the file, it’s a lot easier to identify the version from its commit message.



What next?

Now that you have set-up version control using Github, you can have that cup of coffee even if the recent changes affect your code negatively. The only thing that you need is to revert back to the commit where everything was working as expected. In order to do that, git checkout -- <file_name> is the command for you. This would return the specified file to the previous version and discard all the uncommitted changes.

But it all comes at a cost…

  • Though Github allows you to create a free repo, it remains public; which means anyone can view your files and their revisions when stored on the server. But worry not, if you want a private repository, you can just purchase it. Or you can also switch to other service providers such as BitBucket, which allows you to create a private repo with a single user.
  • Uncommitted changes once lost, are lost forever
  • Storing large amount of data on the cloud is not very efficient as it takes a lot of data and resources to publish a file or to download it
  • As the number of users increase for your private repo, the cost also increases

It doesn’t stop right here though…

There is a lot more to explore in the git world, such as branches, pulls, merging, pull requests etc. Things that make software development a lot easier and collaborative. You can find the online tutorials at https://guides.github.com and make software development easier and more collaborative for yourself and those around you!

But make sure you commit your files before you get started with those tutorials, because you know it too well now “A commit in time, saves hours nine!!!”

References





Written by Saket Joshi, Salesforce Developer at Eternus Solutions
Read More »

Friday 23 October 2015

What Dreamforce 2015 taught me about Sales Productivity: Part 2

In my previous post, I talked about how Dreamforce laid great stress on Social Selling, Sales Enablement and Accurate Forecasting. Well, that wasn’t all. Salesforce also laid emphasis on the significance of a healthy pipeline, sales coaching, setting the right goals and most importantly, prioritization, as the key focus areas for achieving greater sales productivity.

Do NOT Sideline your Pipeline

A healthy Sales pipeline is the key to your Sales performance. Not only does it signify that you have a healthy sales process that is obviously reaping benefits for you, it clearly translates into more revenue. A large number of Dreamforce sessions reiterated on spending more time in refining your pipeline that has more qualified prospects than suspects, and training your Sales team to achieve the same. However, it’s easier said than done!

Gartner reports have listed ‘healthy pipeline’ to be the second most important thing that Sales Leaders desperately need and do not get. The truth is, a lot of sales reps start out not being good at pipeline refinement and management but only the best ones master the art. So what’s the key to pipeline management?

Clichéd as it sounds, the key to a dream pipeline is an effective sales process in place. Statistics show that a dedicated sales process leads to as much as 18% increase in revenue growth through effective sales pipelines. Trained Sales reps are another big contributor towards a favorable pipeline (covered at length in subsequent sections), leading to 9-24% increase in annual revenue growth. Bottom line: revere thy pipeline and hold it in good stead!

Sales Coaching

Dreamforce revealed that the key to sales productivity is in pipeline management. But that does not happen on its own accord; you need to train your sales reps for that. Which brings me to the next pertinent aspect of sales productivity: sales coaching.

Sales reps need to be constantly coached with the right content that would help them close deals faster. This is achieved through a three-pronged process: Identification of ‘coachable’ activities, defining and detailing the coaching methodology and establishing a coaching rhythm that brings the best out of your sales reps.

Sales Coaching involves three key aspects that lead to setting the right goals:
  • Breakdown of sales goals and how they will be measured
  • Focus on the critical activities that lead to success
  •  Focus on fewer goals done well rather than too many goals done poorly

Statistics reveal that organizations have seen up to 80% increase in revenue when sales reps are coached the right way. Dreamforce sessions certainly got this one right!

You need PRIORITY and NOT more time

The final yet the foremost thing that Dreamforce taught me! Any sales guy who tells you he wishes he had 48 hours in a day clearly isn’t on top of his game. The smartest of sales people are the ones who prioritize their prospects and deals, who know how to spend more time with the prospects that are more likely to give them business and Dreamforce could not have laid more emphasis on this fact. A lot of sessions in Dreamforce were targeted at increasing sales productivity through prioritization, and how spending more time with fewer prospects actually holds the key to productivity.

Your time is precious, and as a sales rep, even more so. Identify the prospects who are ‘mobilizers’ and engage with them through commercial insights, instead of mere leadership perspective. Take them through the stages of a verified and validated pipeline and monitor their progress. You will find that they are likely to give you more business than the ones who did not qualify.

Transforming your Sales Productivity: Where do you begin?

In a pyramid of sales productivity, your sales reps form the base. Only ones the sales reps are efficient and effective can they translate and provide value to their teams, organizations and customers, in that order. Therefore, for any organization that is looking to enhance the productivity of its Sales team needs to start at the base: with their sales reps, coaching and enabling them to achieve their targets. Once your army is ready and raring to go, it’s only a matter of time that the world will be at your feet!



Written by Nupur Singh, Pre-Sales & Marketing Expert at Eternus Solutions
Read More »

Monday 19 October 2015

Development Environment with Continuous Integration

Have you ever had to work on the same Apex class or Visualforce page as the guy sitting beside you and wait for him to finish his work? Does your team often work on the same development cycle across multiple instances? Would it help if you could find out bugs before you signed off the build for testing? If the answer to any of these questions is a ‘yes’, Continuous Integration aka CI is the thing for you!

CI: The Evolution…

Originally developed by the Salesforce Foundation to support the Non-profit Starter Pack 3.0, CI is currently being used for Salesforce Foundation’s Cumulus project. It is also available as an open source software to reuse in your own managed package development efforts.

Prerequisites to using CI

Before you can begin using CI, you need to ensure that you have checked all items off the following checklist:
  1. Install Eclipse and Setup the environment variables for Cumulus CI
  2. Download Ant, which allows for easy command-line deployment, and follow steps given at http://www.salesforce.com/us/developer/docs/daas/Content/forcemigrationtool_install.htm to install the Force.com Migration Tool.  Migration tool is a Java/Ant-based command-line utility, which helps ANT based migration by executing Ant scripts.
  3. Create your local development org by visiting https://developer.salesforce.com. It is recommended that you populate some test data.
  4. Download Git, which is the most powerful source code repository and widely accepted amongst the developer communities
  5. Installing the Source tree is optional.  A Source tree provides UI for operations such as Pull, Push, Merge and Commit, instead of using commands.
  6. Install Jenkins on your local machine by downloading the Java Web Archive (.war). Go to the directory where you have downloaded the file and execute java -jar jenkins.war command. If you open http://localhost:8080/ URL in your browser, you can see Jenkins is running on your local machine.

CI: Coding Intelligently!

CI works on the principle of constant flow of development changes and unit testing, in order to detect conflicts and errors within the development cycle itself. The diagram below gives more clarity on this:

  1. As a developer, you need to create a feature branch and pull the master branch in this local development org to get the most recent version of the code, including the changes done by any other developer of your team
  2. Once you are ready to submit the new code version, including your changes, you need to commit those changes and push the branch into Git
  3. Once the changes are committed, Jenkins will launch the build process
  4. The CI server will get the code from the repository and unit testing will be executed by the CI server to find out test class methods, if any
  5. The files will then be packaged into distributable units and deployed onto the test server. Automated functional tests will be executed to validate the package and its basic functionality.
  6. User acceptance testing will be done by CI by deploying the same package on the testing environment. The same package will be deployed on the production server once the acceptance tests are successful.
  7. After running all the tests, the results will be sent back to the developer. If there are any failures, the developer can fix them, commit those changes, and push the same branch into Git.
  8. Your QA team can take the pull of that branch and test it. If any code changes are required, you will need to follow the same process starting from pull till push.
  9. The entire development is done within the feature branch. Once the development is complete, feature branches are merged into the master branch and all other branches can then be destroyed.
  10. A Master branch is a single, persistent branch maintained in the repository to avoid any ambiguity. Once you create a pull request, any commits that you make to your branch requesting to merge, are also included in the pull request. You can use comments on pull requests to explain the issue or solution in brief.
  11. The entire development is done in feature branches (e.g feature/<BranchName>) and all releases are managed through Git tags (e.g uat/1.0-beta3 or prod/1.0).

Benefits of using CI

  1. The quality of a release can be improved significantly by identifying and resolving issues in the earlier stages of the development lifecycle
  2. CI helps developers to run automated tests and also in ensuring the required code coverage. It is helpful for a developer to find out the issues and bugs during unit testing which he may have overlooked during development.
  3. CI process helps to resolve shared development issues. Multiple developers can update the same metadata at same time within the development organization, without any worries.

There you go! You are all set for development using Continuous Integration. In case you need more information, you can also refer to the following links:

  1. CumulusCI Introduction
  2. How To Use Git, GitHub and the Force.com IDE with Open Source Labs Apps 




Written by Jyoti Chouthai, Salesforce Lead Developer at Eternus Solutions
Read More »

Monday 12 October 2015

What Dreamforce 2015 taught me about Sales Productivity: Part 1

It’s been a while that Dreamforce 2015 concluded but the delirium lives on! There’s still so much buzz around the different products and services Salesforce introduced over the 4-day event. However, a CRM no matter how extensive and useful comes into play only when you have a great customer base and an extremely healthy pipeline. Add to that the fact that Salesforce recently posted revenues upwards of USD 5 billion, the first time they touched that number! Therefore, I was hoping that Dreamforce 2015 would cover sessions and trainings around Sales Productivity, as who better to teach you about Sales productivity than the elite member of the 5 billion club? Much to my pleasure, Dreamforce covered Sales Productivity at length and I learnt a great deal of new things!

Social is the new selling wand!


Here’s where you would expect me to write something like ‘Move over traditional sales, social selling is the way to go!’ Well, that ain’t happening! Fact is, social selling has always been there, much before you and I, much before cloud computing, Facebook, internet, anything that you can think of! Confused? Haven’t you always purchased groceries from the pleasant guy next block? Did you purchase your first bike from the guy recommended by your friend? Isn’t your dentist the one your colleague recommended you? These are all examples of social selling! You ask your peers and friends for recommendations, and don’t shy away from dishing feedback.

Same applies for selling anything using Social Media. The opportunities are simply enormous! Thanks to the networked markets, people know more about your products and services than some of your own folks. Use it to your advantage. Reach out to people over Twitter and LinkedIn, engage them in a conversation and help them know how you can solve their problems. Gain real time insight into what your customers are discussing online. You’ll be able to understand their needs (both individually and more broadly across the market). Build relationships and trust, and you’ll be able to engage them with useful, timely information to help.


Image Courtesy www.wsi-digimedia-marketing.com


Investment in Sales Enablement pays big time!


Your people are your assets! By that definition, your sales people are your most valuable assets. Therefore it is logical to invest in their enablement, helping them adapt to the ever-changing world of sales. Educate your sales teams to deliver the right message at the right time to prospects. When sales people are on message, they convert leads and close opportunities faster.

Invest time and money on their skill growth, so that they are aligned to the customers’ needs rather than focused on Why Choose Us. Encourage open communication and easy integration between team members and integrate this Sales Enablement process across the organization, ensuring a team approach towards right sale to the right client. Remember, successful Sales Enablement is 10% tactical and strategic contribution and 90% alignment towards a common agenda.


Image Courtesy: Salesforce.com

Accurate Forecasts is a must


I cannot possibly stress enough on the significance of Accurate Forecasting. However, a lot of sales people lay great stress on the accuracy of a forecast, often without realizing or finding where they are wrong. The trick is to break the forecasts into a series of assumptions that can be referred to later. But if you have ever been a Sales guy, you know this is easier said than done. So how do you make accurate forecasts?

The foremost thing to do is to enable your Sales reps with technology. Let technology do the numbers for them, find insights that they can use to engage prospects in meaningful conversations and guide them through the lifecycle. Use a software or an application that comes with an audit trail, so that you can note any changes to the deal value, customer or probability of cracking the deal and take necessary actions. Bottom line, let your sales people do sales and leave the data and accounting to your technology.

Accurate Forecasting is an art mastered with practice, one that needs your people trained to yield the desired results. Train them to identify the signs that help them identify a good deal from a bad one, enable them to focus on pipeline exceptions and analyze the cause behind them to take corrective action wherever required, and teach them how to constantly refine their forecasts.

With great power comes great responsibility and it is no different for your sales people. Let them know what is expected of them, give them complete autonomy but also make them accountable. Set aside time to review the forecasts, discuss action items for any exceptions and plan the way ahead. Reviewing the numbers together gives multiple views around the same potential problem, enabling the team to find a solution that is most suitable.

It is important to understand and acknowledge that Sales productivity is actually a series of keys that unlock the big prize that Sales productivity is. In my next blog, I will talk about how setting the right goals, sales coaching, a healthy pipeline and prioritizing go a long way towards enhancing the Sales productivity. Till then, happy selling!


What Dreamforce 2015 taught me about Sales Productivity: Part 2


Written by Nupur Singh, Pre-Sales & Marketing Expert at Eternus Solutions
Read More »

Friday 9 October 2015

Case Management: Notify Case Owner on creation of a Case comment via Apex

If you have worked with Salesforce, you will acknowledge that irrespective of the application you are building or the solution you are designing, there will always be scenarios where you will need to override the standard Salesforce functions and extend them to get your functionality right. Today, I have a simple, yet useful Case Management hack, that will simplify your lives to a great extent.

Case is a very powerful object within Salesforce and “with great power comes great responsibility”. While dealing with cases, it is our responsibility as a Salesforce developer to ensure that case owners are notified every time there is a new comment added to their cases. These comment notifications are critical in ensuring that the case owner is aware of all updates made against their case and can plan the next steps required for the successful closure of the case.

Let us take a quick look at what standard features Salesforce offers for similar notifications on Cases.

Salesforce Feature


If you are the owner of a case record and you want to monitor the status of your Case, especially around case comments, Salesforce provides a notification feature for this. This feature is accessible and can be enabled from the Setup menu.

Then why does the Standard Function not Suffice?


It is a commonly requested feature to have Visualforce pages which allow users to add/update case comments. I had a requirement very similar to this, with a slight catch, that my Visualforce page was exposed on a website for customers to log, track and update cases.

When I tried adding case comments on the case object using Apex, these comments were successfully added but the case record owner did not receive any notifications around the same, despite the case notifications feature being enabled.

Here is a snippet of what I used to add case comments.


Let us look at two alternative workarounds to address this issue. The first one requires Apex, while the second one will not require any Apex code!

Trick 1: Using Apex


When we create case comments using Apex, we need to set triggerUserEmail true in our code. Even though auto-sent emails can be triggered by actions in the Salesforce user interface, the DML Options settings for EmailHeader take effect only for DML operations carried out in Apex code.

I implemented this using the following code:


This will now send out notifications on case comments via Apex.

However, you should note that for the notifications to work, Case Owner and Case Comment creator are to be different users.

Trick 2: Using Workflow


We can achieve the same result using a Workflow activity. For this, we need to write a workflow rule on the Case Comment object to perform a field update on the related Case. You can create a Boolean field Send Notification on the Case object for the same.

Step 1:  Create a field with Boolean data type.

Step 2:  Create a workflow on Case Comment as shown below:


Step 3: Create a Workflow action for Field update on Case as shown below:


Step 4: Activate the Workflow rule.

Step 5: Create another workflow rule on Case object. This will send an Email to the Case Owner every time our Boolean flag is updated.


Step 6: Create a Workflow action for Email Alert as shown below:


Pro Tip: You can use a custom Email template for configuring this email alert.

Step 7: Finally, activate your workflow!


Both these options are great workaround to ensure the case owner does not miss out on the updates. Irrespective of which option you go for, you will never miss out on a case alert anymore!



Written by Yogesh Sharma, Salesforce Developer at Eternus Solutions
Read More »

Tuesday 6 October 2015

Data Import from SQL to MS Dynamics CRM


If you have worked with MS Dynamics CRM, you would have certainly needed to import data from your SQL databases. Integration with different servers come with their own challenges. In this blog, I will take you through a simple procedure of importing data from your SQL databases into your MS Dynamics CRM instance.

Before You Get Started

You will need to have a basic idea about how to create SQL queries and decent hands-on experience of MS Dynamics CRM.

Our Target

I needed to get all the entities and entity attributes from my MS Dynamics CRM and create a dynamic table for the selected entity and its attributes as table columns in the database. I also needed to insert multiple records into the table and finally import the same table into MS Dynamics CRM to get multiple entity record in a single click.

Solution

With the help of .net framework & Microsoft Dynamics CRM SDK, I developed a mapping tool for my requirement. This would essentially take care of the following scenarios:
  1. Export & import with MS Dynamics CRM
  2. Creating a dynamic table in our local database
Let's take a look at the screenshots:

Figure 1: Accept URL, Username, Password of the respective MS Dynamics CRM portal


Figure 2: The mapping screen will contain Entities, Entity attributes, SQL server
name and databases of selected server and a button which will create a dynamic table on selected database


Figure 3: Sync with Dynamics CRM button will import table records into Dynamics CRM


How I built my Rome


Step 1
The very first thing we need as per Figure 1 is a Dynamics CRM URL, Username and Password to connect with CRM. I have used IOrganizationService. With the help of this service, we can access data and meta data of the particular organization.

NOTE: For interaction purpose with Dynamics CRM, you need to add the following references:


Clicking on the button will give you the credential and you need to parse the credential by using Parse method of CRM connection class to pass it to IOrganizationService. CRM Connection is a class which is present inside Microsoft.Xrm.Client namespace.

Step 2
As per Figure 2, once we get the credentials, we just need to pass it to IOrganizationService to get all the entities of a particular organization. We can use the following code:


To get the entity attributes, we can use the Attribute Meta data class as shown below. Once we get all the attribute & its types, we can create a dynamic table inside the database with the help of this class.


Step 3
To get SQL server name and databases, we can use SQL server management object(SMO).

NOTE: Add following references to use the SMO:


To get instances of all available SQL Servers, use the following code:


As per figure 2, on selection of the server, we need to get a list of databases which are present on that particular server. For the same, use the following code as shown below:


Step 4
We are ready with our Entities, Entity attributes, Server name and Database. Now we need to create a table for the selected entity dynamically. For that purpose, we need to pass selected server and database name to SMO server and database class respectively. Then we need to create an object of table class, pass column name and data type to the table object and finally call the Create method of table object.

NOTE: Since MS Dynamics CRM attribute data types & SQL data types are different, we must replace CRM data type with SQL data type.

Step 5
Finally we are ready with our dynamic table. Now, we need to insert bulk of record into the table. To import data into CRM, we need to make a request to ExecuteMultipleRequest class and send the list of records to it.

I have used the following code for the same:


And we are done! I ended up creating a reusable component, which provides enough capability to import data from SQL to Dynamics CRM. My migration team loves me to the core!




Written by Neethuanna Matthew,  Microsoft Dynamics CRM Champion at Eternus Solutions
Read More »

Sunday 4 October 2015

5 Things You Must Know About SalesforceIQ

Touted as the future of selling for every business, Salesforce introduced SalesforceIQ in Dreamforce’15 amidst much fanfare. Powered by the game-changing Relationship Intelligence technology that utilizes advanced data science to analyze the relationships between organizations and prospects, customers and partners, the new SalesforceIQ for Small Business and SalesforceIQ for Sales Cloud are expected to transform selling for all businesses. Here are 5 things you must know about SalesforceIQ.


1. Start Selling without Data Entry and within minutes!

Quite literally! SalesforceIQ automatically updates itself with relevant information from your prospect and customer communications, including but not limited to your emails, calendars, calls and marketing software like HubSpot, Pardot and MailChimp. What this essentially means is that your sales reps can now focus on selling rather than mundane data entry within your CRM, something they have always dreaded! Additionally, companies can literally start selling within minutes of setup, thanks to easy onboarding and no up-front setup costs.


2. Superman Selling

This is an era where sales reps are expected to be at the top of their game all the time, almost in a Superman-esque manner. Whether you need to connect to a new prospect or answer his queries, SalesforceIQ helps you do just that. Closest Connections helps you quickly identify people within your network who could provide best introduction to a prospect or a target organization while Intelligence Fields helps Sales reps prioritize and focus on the most crucial opportunities within their pipeline!


3. Say goodbye to back and forth navigation

Not only are your CRM records updated from within your inbox, but your emails are also analyzed and information is brought into your email from your CRM. Say goodbye to navigating back and forth between your emails, CRM and marketing software!


4. Prioritize your opportunities with intelligence

What’s better for a sales rep than having a CRM tell him which opportunities need his immediate attention, without having to hunt for this information? SalesforceIQ captures key insights and information from calls, emails and other forms of communications, thus providing you with the required support to prepare for an opportunity. And if this did not blow your mind, SalesforceIQ comes with an Inactive Days field to alert you whenever an opportunity needs your attention, helping you make faster decisions! A CRM was never this intelligent before!

Image Courtesy Salesforce

5. Plethora of amazing features

Read receipt notifications as alert when emails are opened, follow-up email scheduling, ability to attach files from a range of cloud services and schedule an email to be sent at a designated time are just the tip of the iceberg that SalesforceIQ is. SalesforceIQ comes powered with numerous email shortcuts, predictive notifications and helps you stay abreast with your pipeline. Add automated logging and reminders to this list and your sales reps are in for a massive treat!


SalesforceIQ: a win-win situation!


SalesforceIQ is a smart, easy-to-use CRM built for smart sales people, who are looking to increase their efficiency and spend time on selling rather than worrying about the underlying things. Not only does SalesforceIQ drive success in the organization, it also enables them to deliver increased value to their customers. The bar for selling has been set high and SalesforceIQ is the stairway to that heaven!

You can also read more about SalesforceIQ in this post.





Written by Nupur Singh, Pre-Sales & Marketing Expert at Eternus Solutions
Read More »