Monday, December 30, 2013

Make Sure You Know Their Qualifications!

If you are looking for a Salesforce consultant or developer, I always recommend that you look first at your Salesforce User Group, which gives you the chance to learn about who is in your area either in person or online. (Nonprofit User Groups are linked here.)

No matter how you go about finding help, you should always verify that they actually have the certifications they claim.  Salesforce now offers an online database of certified professionals.  With  someone's first and last name or email address, you can find a list of their certifications and see if their claims are true. Be warned, spelling counts!  For the most accurate information on an individual, just ask them to send you a link to their verification page in case their name or email address may be entered in a slightly different fashion than you have for that individual.

Not all consultants are alike, verify their certifications before hiring.
For example, you can view my certifications by clicking here, or click the photo of me on the right side of the page.  Yet if you were to search for me using the more traditional spelling of my first name, "Bonnie", you would not find me at all.  Similarly, you might know him as "Mike Gerholdt", but you won't find him listed unless you search for him by his formal name, "Michael".

Verification makes finding the appropriate individual for a job even easier, but for the best accuracy, just ask for the link.  Since the data is maintained by Salesforce, you can trust that it is up to date.

Monday, December 23, 2013

IP Addresses And User Access

As a Salesforce administrator, have you ever wondered when and where your users are accessing their data?  A recent new feature gives you even greater information about user access through a list of IP addresses and browsers used.  If you run a really secure database, looking at the list of IP addresses where users have accessed data is a must for security review, but even administrators of more relaxed orgs can use this information to better understand their users' needs.

User Access History By IP and Browser

You can see where in the world your data has been.
 With the Activated Login List,   you can see every IP address users have used throughout their history with your org.  This view provides even more information than the user login history.  You can even review the access addresses for users you have deactivated.  And, if you have any concerns about an IP address in the list, you can just remove access for that address after talking to the user about where they may be when they access Salesforce data.

Before you remove any IP addresses and browsers from the Activated list, you may want to save the information for future reference.  You will not see the removed data in your recycle bin!  So if you want to keep a record of which users activated their accounts for which IP addresses and browsers, save before you remove. 

Note that Salesforce documentation states that removing a user's IP address activation may only trigger a new activation confirmation request for that address if you remove activations for both the address and the browser used for that access, which you can find in a second list on the Settings>Security Controls>Activations screen. 

Just below the Activated Login List, Salesforce, the browser list contains recently Activated Client Browsers and gives you a more clues about how your users access data. This can be useful when you review your mobile access policies since many mobile devices can be obvious according to the browser listed here.

Unfortunately, the browser and IP address lists don't always coincide.  The browser list does not go as far back in time as the IP address list, and for my own personal activations, I found an IP address I activated at a specific date and time and three different browser activations listed within an hour of activating that address as I used different Connected Apps.

Dynamic, Static, Fixed Or Sticky

If you are surprised by the number of IP addresses that individuals have used to access the database, keep in mind that an Internet Service Provider (ISP) and local hosts may provide dynamic IP addresses from a set list of addresses.  In that case, the last digits of the address may be different for one user on a single device. 

Learning about your user's IP addresses and browsers gives you a more complete picture of what is needed to provide or deny data access for users.  Combining the Activated Login List with the login history report gives you a more complete view of what your users have been doing in Salesforce and with mobile applications like Salesforce Touch and Salesforce1.

Monday, December 16, 2013

Advanced Data Manipulation With Flows

Salesforce Visual Flow provides a relatively easy means to design task-specific user interfaces for end users to interact with data.  But it is important to note that Flow data is not permanent and exists only during one user's execution of the Flow.  You easily can connect Flow data to your Salesforce database, Visualforce pages and Apex code as well.

See my previous posts for more information about how Flows can simplify difficult processes for Salesforce users and tips for styling Flows

Record Lookup

Don't forget to save data if you need it!
If you intend for users to save the data, it can simply be written to Salesforce via the Flow data creation elements.  Similarly, there are elements for retrieving, updating, and deleting Salesforce

One of the important elements for connected Flow data to your Salesforce database is Lookup.  You can use the record lookup element to prevent duplicates when users enter data using Flow forms.  Note that the lookup will only return one record at a time.  If, for example, your form requests four fields for a Lead: first and last name as well as an email address and company, you can use all four to match the newly input data with existing data in Salesforce.  An exact match will be returned for Pat Smith with the same company name and email address.  It will not return matches with similar company names.

In addition, if there are already two Pat Smith leads with the same company and email address, currently only one of them will be returned.  At Dreamforce 2013, there was some talk about future releases returning a collection of records.

Once you have sorted out duplicates, you can determine whether the Flow data should be used with the Create element to create a new record in Salesforce or with the Update element to modify an existing record.  Make sure your Flow users have the appropriate object permissions to perform these tasks.

Error Messages

When you connect Flow data and Salesforce data, note that Salesforce might generate errors.  For example, because Flows respect user permissions and security settings as well as required fields, a user could try to save or retrieve data that is not appropriate for them.  In these cases, Salesforce will return an error.

Use a Decision Branch to process these "Fault" behaviors after linking to Salesforce.  For example, you can present error message Screens or send a user back to a previous Screen to start over.  

Accessing Flow Variables

If you need to use it in more complex processes, Visualforce and Apex can help.  As I mentioned, Flow data is not automatically retained and is unique to the specific user's current execution of the Flow.  Variables within the Flow can be made accessible to Apex and Visualforce by changing their settings from "Private", for use only in the specific Flow, to "Input", "Output" or "Input and Output".  These settings will also determine whether a Flow variable can be accessed by other Flows when one Flow contains another existing Flow as a subflow.

Note that the only way Visualforce by itself can access Flow variables is when it sends initial values to an Input variable.  For example, if your Visualforce page calls a Flow named JustSteps, it can pass a value to start at a specific step.  The code for passing a variable to specify step 3 might look like the following on the Visualforce page:

    <flow:interview name="JustSteps">
        <apex:param name="stepNumber" value="3"/>

The Flow would then need to incorporate a Decision element at the start to check the stepNumber Input variable.

Note that Visualforce cannot change the value of a variable after the Flow has been initiated, nor can it retrieve values from Output variables without the use of an Apex controller as well.

Apex & the Flow

You can gain even more control over Flow behavior by using an Apex controller with your Flow.  The most basic controller provides your Visualforce pages access to output variables.  For example, a simple controller might look like the following:

   public class FlowClass {
    public Flow.Interview.JustSteps myflow { get; set; }

Note that the  Flow name is the same in the class and in the Visualforce page that refers to the class. 
In this case the Visualforce page that uses the controller and retrieves values for a Flow Output variable called "stepsRemaining" might look something like this:

   <apex:page controller="FlowClass">

    <flow:interview name="JustSteps" interview="{!myflow}" />
    <apex:outputText value="Remaining steps: {!myflow.stepsRemaining}  "/> 


Another way to get more out of your Flow is through the use of an Apex plug-in.  Note that plug-in code needs to have a particular bit of code in use in order to implement the Apex Process.Plugin Interface.  An Apex plug-in can then be incorporated like any other element directly into your Flow and can assist with more complex data processing such as creating and saving attachments or converting Leads.

Once you start delving deeply into Apex and Visualforce for use with your Flow, you will probably want to reconsider managing the process.  If your process is very code intensive, you might then decide to bypass Flow and create what you need with just Visualforce and Apex.  For those who prefer not to code any more than they have to, Flow is a great alternative.

Monday, December 9, 2013

User Interface Improvements With Salesforce Flow

Flow gives administrators the opportunity to offer users a custom interface for interacting with Salesforce providing as much help as you think they may need to get their jobs done, from simplifying data entry to providing insight to help users complete forms, all without the need for code.

Last week, I defined some use cases for Flow and offered a presentation to introduce you to various features of Flows for data input and Salesforce record creation.  This week we look at ways to improve the user experience with Flows.

You can access the demonstration Flow I created at


Cascading Stylesheets offer control.
Each Flow Screen has its own Help Text area, which you can use to add an extra bit of information  that may not be needed by all users.  In my example Flow, the lead form Screen includes a link to Help, located with the "Next" and "Previous" buttons, to let users know that their information will not be shared.  Other Screens offer more in-depth information in their Help.  And Screens that don't have Help text do not show a link at all.

Because Help text is defined per Screen, your Flow can provide context-sensitive help to your users.

Branding & Style

Flows offer two ways to format output display text and Help text.  Toggling to the Rich Text Editor while editing text, you can select formatting option buttons for bold, italics, font, etc.  But you can also enter HTML tags directly without toggling to the Rich Text Editor.  For example, "Not Bold and <b>Bold</b>"  will display the following: 
Not Bold and Bold

You can also use HTML tags to add an image directly to your Flow.  For example, adding the following to display text will display the Bay Area Nonprofit User Group logo: "<IMG SRC="" WIDTH="100" ALT="SNUGSFBay">"

For even more control over the look and feel of your Flow, define a cascading stylesheet (CSS) and incorporate both the Flow and CSS into a Visualforce page.  Among the tags particular to Flow are FlowContainer and FlowPageBlockBtns.

Special Tip

One undocumented CSS tag that you will want to know about if you change the background color of your Flow is interviewFormHeaderCell.  If you see a random underline character at the top of every Flow Screen, it comes from a bit of code automatically inserted by Salesforce, and is a known bug.  To get rid of the stray text use the following code in your Visualforce page or adapt it for your CSS file:

    <STYLE type="text/css">
        .interviewFormHeaderCell {border-bottom:0px;}

According to technical support, this is the only way to get rid of the unwanted character as of Dec. 9, 2013.

Next week's blog post will describe some of the more complex data handling options currently available with Salesforce Flow.