Friday, 10 January 2014

Can we set Salesforce.com user password?

As Salesforce.com administrator we often get questions from our user, " can you check what is my password? ", hmmmm, user often think it like some legacy application, where system admin able to see or modify it as we would like.


But, Salesforce.com is different, system admin not able tosee or modify user password. We often offer the user to reset their password, where Salesforce.com will email that user with instruction to set new password by  their own. And it works fine.


But again, some user (read: senior management) not really want to bother by checking email and so on, even this request is come from his/her secretary. So how? No problem, we can change user email to her secretary email, secretary confirm email change in her email (although Salesforce.com also will email to the original email that her email has been changed to new one), and reset password. It works, yay!!! 


But, how to change back the user email to the original one? The senior management need to click a link again in her email (she may have hundreds or thousands email never read). Problem.


So, I just start think if there is a way just to set user password easily without have to go through such complicated process? It is worst when the user is going to present something in 5 minutes and we do not have much time to do above process. So, can we set user password?


YES, it is possible, even this function is not exist in Salesforce.com configuration menu, but Salesforce.com kind enough to provide system admin with Developer Console. Yes, Developer Console is for developer as it named, but admin also can use it for other purpose, like set user password, yay!!!



How? It is easy, just few click and copy paste a sentence will do. Go to your name and click Developer Console menu. 

It will open new window and you need to copy and paste below sentence to the Execute textbox.

System.setPassword('00550000000rlrX', 'hello123');



00550000000rlrX is the Salesforce.com User Id, if you are Salesforce.com admin, you should now this Id well, and hello123 is the new password to set.


But, if you still too lazy to check the User Id and user pass you their username, you can just copy and paste statement below into Apex Code execute box:

System.setPassword([SELECT Id FROM User WHERE username='joe@lazy.com'].Id, 'hello123');

Below sample script to set password of all active user in one go:

List<User> userList = new List<User>();
userList = [SELECT Id from User WHERE IsActive = true];
for (User u : userList)
{
    System.setPassword(u.Id, 'hello123');
    System.debug('DONE: ' + u.Id);
}

You can modify SOQL above as the need, may be to include only profile = "Sales Rep".


All statements above is apex code, but we can utilize it for other productive work as needed.

Can we set Salesforce.com standard field to be unique?

Salesforce.com administrators and consultants often get business requirement to set standard Salesforce.com fields to be unique. In some companies, we need to make sure every mobile phone in Contacts have to be unique (if it is not blank).

And as we known, until now, we are not able to set standard Salesforce.com field be unique, only custom field have this option.


So, any solution? Yes, there are few ways to get this done, from a simple one until a difficult one.


1. Trigger

Using trigger may be not a simple way, we need a developer who well understand Salesforce Apex Trigger. Developer need to write apex code in Developer instance or Sandbox instance, make sure the test method coverage above 75% and deploy it to production. 

Developer may be like this approach, although it is not something prefer by administrator. Trigger in Contact before insert and before update, query all Contact with mobile phone enter, if query result is > 0, add error and don't allow to save or update that Contact.


2. Using new custom field

Instead of using standard Salesforce.com standard field, using the same sample as above, we can build a new Mobile Phone field with field type = Phone. And hide standard Mobile Phone field from Field-Level Security (Prefer not just hide from Page Layout).

But, if this is an enhancement, it would be more effort to extract existing data to external file, verify there is no duplicate value and import the data back to the new fields. This even become worst, if the standard field has been used in many places, such as: reports, apex code, workflow, etc.


3. Workflow + Field Update

This is prefer option with less effort. Create a new custom field and enable Unique option then hide it from page layout. Create a workflow with criteria ISNEW() || ISCHANGED(MobilePhone). Create immediate workflow action to update the new field above. 

This option may be more simple, but the error message shown is not clear as it is not say what field is duplicate, but just inform it is duplicate with which record, example: "Duplicate value on record: John Wood". User do not know exactly what is duplicate between Contact working on with John Wood, if we have more than 1 field need to be set unique.

Salesforce.com hidden features

Salesforce.com come with tons of features for administrator to make everything their live easy. But, do you know if there is more features which is not enable by default. You need to contact Salesforce.com support to enable it.

Here are few features a consultant usually love:


1. Ability to update created date and last modify date

This sound crazy? But yes, sometimes you need this when do initial data migration to Salesforce.com

2. Extended Mail Merge

With Extended Mail Merge, you can easily generate mail merge Word documents

3. Person Account

For some companies, not all of your customer is company, instead just linked all contacts to the same Account, you can request to enable Person Account.

4. Remove Price and Quantity fields from Opportunity Product

Rather than always put 1 to quantity, you can request Salesforce.com support to remove price and quantity from opportunity product page layout

5. Upgrade file attachment size to 10 MB

By default, user allowed to upload file to attachment maximum 5 MB per file, but we can request to make it to 10 MB.

6. Email Relay

We can request all email send out from Salesforce.com via our email server for audit or security purpose or etc, we can enable this feature.

7. Encrypted Field

Some confidential data, like credit card number; need to be protect. User should not able to see the information unless he is the person needed. With enabling encrypted field, admin can manage only some users able to view sensitive data, but be aware that encrypted field is not searchable and the data length is shorter.

8. Multi Currencies

Multi national companies will get most advantages once multi currency enabled. We can use it in opportunity, forecast in reports.

9. Sandboxes

Number and type of sandbox is depend on your Salesforce.com edition, but you can purchase sandboxes as needed.

How to Create an Email Template in Salesforce

The San Francisco-based software company Salesforce provides Customer Relationship Management (CRM) for businesses by subscription. Salesforce's CRM allows you to keep track of contacts, conversations and other information related to business accounts. This database allows people from different departments to interact with the information with increased efficiency. Salesforce also boasts a number of ways to streamline communication, such as website data and email templates. You can create an email template that can be sent out en masse, allowing you to reach customers quickly. This article will tell you how to create an email template in Salesforce.

Steps:
  1. 1
    Sign into your Salesforce account. You will be asked for an email and a password. A company signs up for the Salesforce software, and then each user is assigned a unique login and a set of permissions to change the data in the system.
    Ad
  2. 2
    Click on the small arrow next to your user name in the upper right hand corner. Click "Setup."
  3. 3
    Select "Create or edit an email template," under the "Email" heading. Select "New Template." There are probably a number of templates that the company has created already. Some can be edited and some may be protected from editing.
  4. 4
    Choose the type of email you would like to create. Most likely your options are to create a simple text email, an HTML email, an HTML email that includes a Letterhead, a Visual Force email or an email without letterhead. Your company has most likely added the letterhead into the emails and it has been written in HTML code. This is the code that much of the Internet and email programs use. Click "Next" once you have chosen.
    • All of these types will allow you to type in text, attach files and select people to receive your email. Both text and HTML emails can be used when sending mass emails, but they cannot be sent out with a Visual Force template. Only HTML and Visual Force templates allow you to place images within the text. There is likely a company standard for sending emails with or without letterhead.
    • Salesforce HTML emails are set up for tracking, so you can easily find out if someone has opened your email and how many times they have read it. A text email does not have tracking, but it runs a high risk of being filtered by anti-spam programs.
  5. 5
    Go to "Letterhead Creation" if you have chosen an email with letterhead. This will give you a number of visual layouts for your letterhead. You can choose whether you want it on the top, top and bottom, etc.
  6. 6
    Type in your email template's name and choose letterhead and layout options. Also specify any encoding you desire, a description and what folder you would like it to be placed in. Make sure to check the box that says "Available For Use" or you will not see it as an option on your Salesforce email template list.
  7. 7
    Move forward to the email template after you have created your letterhead.You will need to type in a greeting, a body of your email and a signature, as well as any other important things.
  8. 8
    Use the "Merge Fields" values below the formatting toolbar. Salesforce merge fields allow you to define something that you would like to be personalized for each person and it creates a code that you will place in your template. When the email is sent out, it will populate those fields with values in the contact's information page.
    • For example, perhaps you want to put the contact's first name in the greeting of your email. In the "Available Merge Fields" section, select the field type, such as contact information. Select the field, in this case "First Name." When those fields are filled in, a code will appear to the right. Copy that code and place it after "Hello" and before the comma. When your email is sent out it will say "Hello Betty," and your email will continue below.
  9. 9
    You can also do this with the company name or any other information that is part of your contact's information. Make sure you choose something that is always filled in, or you will have blank spots in some emails.
  10. 10
    Click "Save" to save your email template for future use.
  11. 11
    Return to your user name, setup and "Create or edit an email template" to change or delete an email template. Select your template under "My templates." Select "Edit" or "Del" to edit or delete, respectively.
  12. 12
    Use your email template by going to a contact page, scrolling down to the bottom and clicking the "Send an Email" button under "HTML Email Status." Click "Select Template" at the top and choose your newly created template.
    • You can also mass email contacts with your template. Go to the "Contacts" tab, scroll to the bottom and click "Mass Email Contacts" under the "Tools" section. You will be led through the process of choosing a template and choosing a contact list before sending.

Thursday, 9 January 2014

Finding Information in Salesforce

One of the issues I see new users to Salesforce.com struggling with frequently is knowing where to go and what feature to use to find needed information. If you need to find a record, what is the quickest way? If you want all the contacts in a certain area, how do you do that? If you want to see a list of top performing sales reps, what Salesforce.com function do you use?

Salesforce.com has made it very simple to find the answer to any of these questions, but with any capable system, finding your way through all that capability and learning to use those tools can be challenging. Let me see if I can make it any easier.

Salesforce.com generally gives you 4 ways to find and display information:

1) The Search Function
2) The View Function
3) Reports
4) Dashboards

Let me take these one at a time:

Search

The Salesforce search function has two levels of complexity: basic search and advanced search. Search is a great feature - and quite powerful. The search form in on the sidebar every page of salesforce except setup pages. It is typically the fastest way to find one record. If you need to find someone at a certain company, just type some portion of the company name into the search box and click search.

Advanced Search searches more fields than the sidebar Search, including notes, descriptions, and comments. It has the ability to use operators such as AND, OR, and AND NOT to help you find exactly what you are looking for. You can put quotation marks around multiple keywords to perform an exact phrase match, for example, "call john smith". Plus, it allows wildcards - add an asterisk to the end of your keyword to search for items that start with the word, for example, "acme*".

You should note: Search does not display results from related lists. For example, if you are searching for a contact at a company, the search function will only find and display the Account Name, even though there may be several contacts at that company. Once you see the Account you are looking for, open that account record to display the contacts associated with it on the related lists.

I find many users of salesforce only using one way to find information, when another way would make much more sense. The most common mistake I see is overusing search. For example, one user I worked with needed to see all his contacts in a given zip code to plan a series of on-site visits in his territory. He was trying to find these contacts using search. A much better way to find this information is the VIEW feature of salesforce.com.

View

Finding information is always about choosing a database, filtering that data, and choosing how to display it. As a matter of fact, functionally, this is all a database is good for. Storing information is only useful if you can later find what you saved. The View is just a more capable way of filtering and displaying information than the search.

The primary limitation of the View is that it limits the filtering to the object type in which it is located. An salesforce object is a Lead, Contact, Account, Opportunity, etc. You might also have custom objects such as Projects or Invoices that help you manage your particular business processes. Since the View is limited to one object type, it cannot be used when looking for information spanning multiple types, such as all the contacts associated with a given account. To combine multiple object types, a Report must be used.

At the top of each object main page, you will find the View drop down menu. Salesforce has already created many views that it thinks most people will commonly need such as All Contacts on the contacts page or My Opportunities on the opportunities page. But to really get the benefit of the View function, you'll have to learn to create new Views. To create a new view simply click on the "Create New View" link located right next to the View drop down menu.

The Create New View page has three basic sections: 1) View Name, 2) Search Criteria, and 3) Select Columns. Each of these are fairly self explanatory, although the search criteria requires you to use basic logic functions such as "equals, does not equal, contains, does not contain", etc. Some people initially have some challenge with this if they prefer the visual functions of other CRM packages such as ACT. It is entirely logical though and allows for more precision when searching for certain records.

Reports
The Report function overcomes the limitations of the View function and ads several additional capabilities. An important capability of the report function is the ability to combine information from multiple record types. This capability is addressed when a new report is created by asking the user to select the type of data to report on and offers the user the option to select data from related lists at the same time. Other important features of the Report function are its export capability, charting functions, and drill down functionality.

Dashboards
The Dashboard is named such with the idea of a car's dashboard in mind. The dashboard tells the driver all he needs to know about the performance of his car. In the same way, the salesforce dashboard tells the company leadership in a glance about the performance of the company. It can also tell any user of salesforce about the performance of whatever aspects of the company they are responsible for. For example, sales reps can see dashboard elements about their sales, support reps can see dashboard elements about support, etc. Many different dashboard pages can be created and they are completely customizable.

The Dashboard takes the data of the report and puts it in a chart. Reports have their own charting function, but the dashboard allows you to take the charts of many reports and put them on the same page. Each user can create any kind of dashboard that they like. Elements can be tables, charts, graphs, pie charts, etc - there is an unlimited variety of ways to display performance information.

So there you go - when trying to find salesforce.com information, remember that there is more than just the search, also use Views, Reports, and Dashboards to get the most out of your implementation.

Desktop Login Shortcut

One little time saver that a client asked me about a few days ago was, "How do I put a shortcut on my desktop that automatically logs me into Salesforce?"

Its actually pretty easy, but you'll have to make it yourself.

Okay, here is how you do it.

1) Go to the login page of salesforce and right click on the desktop. From the menu that pops up, click on create shortcut. That will put a shortcut on your desktop.

2) Next, edit the shortcut by right clicking on the shortcut and selecting properties. You should see the following link in the URL field:

https://www.salesforce.com/login.jsp

3) You need to add the login validation text to the end of that link. It looks like this:

?un=username&pw=password

The username is your salesforce login username email address. Note however, that you cannot put an @ symbol in the URL so it is replaced with a %40. So it will look something like this instead:

?un=name%40domain.com&pw=password

and obviously enter your actual password in place of "password". So the finished link will look something like:

https://www.salesforce.com/login.jsp?un=name%40domain.com&pw=password

4) Click on OK to save the properties box. Your desktop shortcut should now be active and will log you in automatically to salesforce.com and bring you to your home page.

Another useful trick is to add a keyboard hotkey to the shortcut. You'll see the "Shortcut Key" field on the properties editor (same one you had open before). Type in S in the shortcut key. As soon as you type it, a "CTRL + ALT + S" will appear in the place of the S that you typed. Click on OK to save the properties box again.

Now, when you want to login to salesforce.com, just hold down CTRL + ALT and type S and automatically a browser will open and login to your salesforce.com account.