Sonoma Partners Microsoft CRM and Salesforce Blog

Let Lightning Processes change the way you Workflow – Related Records

In the last post, we introduced the new Lightning Process builder and looked at the simplest use case of updating the current record. Today, we want to take a look at a relatively common need: updating or creating related records when certain conditions are met on the current record.

Deactivating related records

As an easy example, we’ll build upon the concept of deactivating records we discussed in this post. In our case, if we deactivate an Account, we want to automatically deactivate all child Contacts as well. Using a Process, this task is straight forward.

To begin, we’ll create a new Process:


Next, we’ll add the Account object as the target object and set the criteria appropriately:


Finally, we’ll add a new action to set the Active bit on all related Contact records to false as well:


For good measure, we can do the opposite operation when records are reactivated:


With just these few clicks, we’ve created a powerful new process that will help us enforce data integrity across objects.

Creating Related Records

Updating related records is fine, but we can go further. Imagine we have a requirement that whenever an Account is deactivated, we need to store who deactivated the record and when for auditing purposes. To show off Processes, we’ll create a new custom object related to Accounts that stores this information:


For this example, we’ll be using the CreatedBy to track who changed the status, and the native CreatedDate field to track when it happened.

We could create a new Process to handle this, but since we already have one that deals with Accounts being activated/deactivated, let’s reuse that instead. This helps keep our number of Processes we have to maintain to a minimum, and makes it easier to reason about what is happening when in the system.

Going back to our process, we can add a new Immediate Action for when an Account is deactivated to create a new Account Status History record related to the Account:


Doing the same for the Activate branch and we now have an audit trail built using Processes:


This highlights two important things to note about Processes:

  1. Just like workflows, we can take multiple actions when a record reaches a given state. Combining processes makes it easier to understand what criteria cause what groups of actions, so we recommend keeping your processes as combined as possible, while still making them readable and understandable.
  2. Processes allow us to do some new actions which previously would have required Apex code (like creating related records). This is a big gain for system administrators as they now have another tool with which to meet their business requirements.

Wrap Up

Today we saw that Processes can take us beyond workflows by allowing us to update and create related records without having to write any custom code. They also allow us to take multiple actions, just as with workflows, so that we can combine our logic to keep it as clean and understandable as possible. However, this isn’t all they offer us that’s worth exploring. Stay tuned as the series continues and we explore another set of features!

Topics: Salesforce

Let Lightning Processes change the way you Workflow

One of the biggest, if not the biggest, feature in the Salesforce Spring ’15 release is the Lightning Process builder – a totally new way for us to build point and click logic that runs in our organizations. The builder is a rethinking of how workflows should function and provides us with a range of new possibilities that would have previously taken triggers and custom Apex code to accomplish. In the coming series, we’re going to be taking a deep dive in to the Process builder to see what’s new, what’s old, and what’s just plain cool.

Baby’s first process

To begin, we need to know how to get to the builder and create a process. After you have logged in to an organization, you can get to the builder by following Setup > Create > Workflow & Approvals > Process Builder. 


Once you click on the link, you’ll be taken to a new page with a very different kind of UI:


This is the new process builder UI. On this page, you’re given some basic information on what you can do as well as a few helpful links.

To demonstrate the power of the process builder, we’re going to build a few sample processes. Today, we’ll assume that our requirements are:

  • When an Account is created or updated
    • If the Type is Prospect, we want the Industry to be Agriculture
    • If the Type is Other, we want the Industry to be Banking
    • If the Type is anything else, don’t change the Industry

Before we dive in to the Process Builder, let’s take a moment to remember how we would normally approach these kinds of requirements.

The most straight forward way would be to create two workflows: one for each of the two Types we want to handle (Prospect and Other). Each workflow would have its own field update action which updates the Industry to the known value. This works, but does have the downside of the logic being split between two unrelated workflows. This isn’t a huge problem if you only have two workflows total, but if you have dozens or hundreds of workflows, it can be difficult to figure out what workflows are related to what other workflows, and to debug why they might be interacting with each other.

As an alternative, we could create one workflow that checks for both of the types, and then uses a formula to figure out which value to set Industry to. This works, but isn’t as readable as using the two workflow approach. It also doesn’t scale well if you want to create a workflow that deals with more than just a few values.

Let’s look at how a Lightning Process would solve handle these requirements.

On the process builder, clicking the new button brings up a page for us to name our new process and optionally enter a description about it. Once we fill in these fields we’re taken to the main screen of the builder:


Here, you can see that processes are laid out as flow charts, and we build processes by adding and modifying the elements of the flow chat.

To begin, we’ll tell the process that we want to act on the Account object by clicking the Add Object box:


Then selecting Account as the object. In our case, we want this process to run if a record is updated as well as created, so we’ll choose the second option under Start the process.


Leave the other options as the defaults for now and click Save.

Now that we have a processed based on Accounts, it’s time to start adding some logic to it. We’ll handle the Prospect type first by clicking Add Criteria to add a new Action Group (a set of things to do if some logic is true).

The resulting screen should be pretty familiar to anyone who’s built a workflow before, most of the options are the same and it uses a very similar layout. I’ve built out what we’ll need for our first group already:


Notice the very last check box – this tells the process to only execute this branch of logic if the current set of changes made these filters evaluate to true. Without this check box enabled, this logic will run any time the record meets this criteria, regardless of if the change made to the record had anything to do with the filter or not.

After we click save, we’re able to start adding actions if the filter criteria evaluates to true:


Clicking Add Action brings up a new screen that is again similar to building an action for a workflow to take. For now, we’ll create an Update Records action and give it a fitting name:


The next part is a little tricky, when you click the Object drop down you’re presented with a layover (which is a little confusing from a UI perspective…). In this layover, you would expect the Account’s fields to be in the dropdown box:


But in actuality if you click on that dropdown box, you’ll only find the relationship fields. 


This is happening because what you’re actually selecting here are the objects you want to update, which hints at something more powerful than we’ve seen before – the ability to update all related records of your current record. We’ll revisit this idea in a future post.

While it doesn’t look like you can, you can actually click on the text ‘Account’ to select the current Account record as the record we’re going to update.


Once we click save, the rest of the screen is fairly straight forward:


Click save, and we’re done with this branch of logic.

Going beyond workflows

At this point, we haven’t built anything we couldn’t have done with a workflow. Now, we’re going to build out another branch of logic which handles the “Other” type within the same Process and you’ll begin to see why Processes are so powerful – we can effectively combine multiple workflows in to one and still have them be readable and maintainable.

The steps are almost identical and final process looks like:


We could keep adding logic branches – the more we add the more benefit we get from using a Process over a workflow. Once we’re done building a Process, we need to activate it (just like with workflows) for it to do anything.


This is just a small taste of the new power Processes give us, but hopefully you can see their usefulness already. Stay tuned and we’ll take a look at some of the more advanced things you can do with Processes that will help simplify and automate your organizations.

Have a question? Confused about something we wrote? Need help figuring out how to automate your organization most effectively? Contact us and we can help.

Topics: Salesforce

eBook: The Trail to CRM Triage

So your first attempt at implementing a CRM system didn't go as planned. Did you know that an astounding 63% of CRM initiatives fail? And they fail for lots of different reasons:

  • Lack of ownership
  • Lack of system management
  • Lack of priority on project's success
  • Inadequate planning and road-mapping
  • Specific partner shortcomings

Maybe your previous partner over-promised and under-delivered. Perhaps there was a lack of planning and poor communication that led your system to its inevitable downfall. Maybe the final product could be described as lackluster at best; it looked great but it didn't really do anything. Or maybe, the project went swimmingly and you're elated with the final product but no one is using it.

Regardless of the reason, we've seen and rescued our fair share of poor CRM deployments. If it makes you feel any better, you're not alone. 

If your previous attempt at CRM left you with a plundering system and an overall sense of frustration, don't give up just yet. A well implemented CRM can do much more than manage prospects, contacts, and sales pipelines. A successful CRM system can help you meet your company's business objectives and ensure that you compete successfully over time.

Download our new eBook, The Trail to CRM Triage, and follow these five steps to guarantee CRM success the second time around. 

Topics: CRM Best Practices CRM Upgrade

Survey Solutions in Salesforce

Today's post is written by Richard Failla, a Salesforce Business Analyst at Sonoma Partners.

One of our clients recently asked us to design a survey solution for them. At that time, they had a separate system they used to manage, administer, and report on customer satisfaction surveys. Much of this work was done manually, especially the reporting piece, which involved some heavy Excel crunching. Our project goal? Use Clicktools to create a more automated solution that brought survey data into Salesforce, thus creating a more holistic customer picture.

After reviewing the requirements I noticed some common issues when implementing a survey solution that would require some creative approaches.

The Problem: “Surveys need to be personalized for each of our clients.”

Since you need a custom field for any survey question you want to pass back into Salesforce, there’s a problem of rigidity: how do we build a solution that allows survey questions to be customized without needing to constantly add new custom fields? The trick was to take each survey question and ask, “What metric does this question probe?”

The Solution: “Don’t fixate on specific survey questions, group them into question themes.”

Let’s look at an example question from a survey:

“Our team is responsive and acts with a sense of urgency."

Mapping that question verbatim to a custom picklist field would make it inflexible and cumbersome to manage for an admin should the question change in subsequent surveys. So instead, we created a custom picklist field and called it “Responsiveness.” Mapping the question to a more general theme allows the flexibility to change the wording of the survey question without having to manipulate the metadata it maps to. So we apply this logic to all relevant survey questions. Here’s an example:


Now, in a future survey we can change the wording of the question in the CMS without having to change it in CRM, so long as the question still gets to the heart of the metric we’re after. 

The Problem: “Each new survey must be re-mapped by an admin.”

The value of automating survey data into Salesforce comes with a cost: each new question/survey you want to ask needs to be re-mapped to Salesforce. This takes unnecessary time to plan and coordinate with admins and can easily delay pushing out surveys. While not ideal, it’s doable if you have an admin but without one this solution looks less sustainable over time.

The Solution: “Create a master survey template.” 

Using Clicktools, we created a master survey template. This template included every single question theme across all surveys. To clarify, no survey questions were added to this template - only the themes we created back in Salesforce.


One of the great things about Clicktools is that it allows you to hide questions on surveys. By hiding all questions, users could use this template to create new surveys by simply replacing the theme with the specific question they wanted to ask and un-hiding the field. Since this master template has already been mapped to all themes in Salesforce, admins would never have to re-map. We also took some time to think through questions themes that could come up in the future but aren’t necessarily on any current surveys and included them in this master template.

The Problem: “Feedback should be collected for any response that scores poorly.”

Client feedback can help you identify areas in need of improvement but to eliminate the guesswork in rectifying the problem, you need to know why you’re not meeting expectations. For our solution, we could have dropped into the survey optional open-ended feedback boxes after each question but that only muddies an otherwise simple form.

The Solution: Creative dynamic question conditions in Clicktools

A neat feature in Clicktools is the ability to dynamically pop questions onto the form based on a
certain condition. In our case, for any response that scored “Neutral,” “Disagree,” or “Strongly Disagree,” we popped an open-ended feedback box. 


So we actually created an open-ended feedback box for each question on our master template (and likewise, created these in Salesforce). Since these questions appear dynamically, there’s no need to “hide” them on the master form thus alleviating admins from more manual manipulation.

The Problem: “How do we use calculations to assess our performance if our response options aren’t numbers.”

For the majority of questions in our survey, respondents had the following values to choose when answering:

  • Strongly Agree
  • Agree
  • Neutral
  • Disagree
  • Strongly Disagree
  • Don’t Know

These options make it easy to map to picklist values but we lose native reporting functionality if we leave them like this. What happens if you want to see the average score for a particular question over time?

The Solution: “Use formula fields to convert picklist values to numbered scores.”

Lucky for us, we can create a simple formula field that assigns a number value for each response:


Without this formula we’d have to either change the survey response options to numbers (which may not be an option) or settle without basic reporting functionality for trend analysis. With this formula, we can both preserve the original survey and still leverage native report summarizations in Salesforce. So we apply this logic to all survey theme questions in Salesforce:


There’s nothing crazy here, but this little formula allows you to leverage native reporting functionality in Salesforce without compromising the original survey.

The Problem: “What’s the top-box and top-2-box score for a particular group of questions?”

If you don’t know, the top-box is the most positive response possible for a given survey question. Subsequently, the top-2-box is any question that scores at least the second most positive response. To determine these scores, we used the following formula:

Total Number of Top-Box Responses / Total Number of Responses

We knew there was some combination of field and report formulas but we scratched our head a bit to figure out how to tie it all together.

The Solution: “Create parent groupings for your question themes and reference them in formulas.”

In order to begin designing a solution to this problem, we had to bundle our themes into parent groupings called “dimensions.” At these dimension levels is where we would apply our top-box scores. For example, we grouped the following question themes into a dimension called “Relationship":


We created three other dimensions and grouped all themes to one of these. We then used 5 formula fields for each dimension to calculate the scores.

Not every question theme was included in a survey so the first formula needed to count the number of total questions in a dimension with a valid response (excluding “Don’t Know”):


Now we needed to find how many of those questions contained either a top-box or a top-2-box response.

Here’s the formula for the number of top-box questions:

8And here’s the formula for the number of top-2-box questions:


At this point, we had everything we needed to calculate our top-box scores, so we created two more formula fields.

Here’s the formula for the Top-Box Score:


And here’s the formula for the Top-2-Box Score:


We applied this same logic to each dimension and now we can see how each dimension performed on a given survey:


Furthermore, we can see how these scores change over time by rolling them into a dashboard with a simple average summary:

Collecting customer feedback in Salesforce requires some consideration before implementation but with only native functionality we were able build a flexibly dynamic solution that requires minimal admin intervention, automates reporting, and can be easily manipulated to account for new surveys in the future. 

Topics: Salesforce

CRM 2015 – Custom Help Content

With CRM 2015 Microsoft added the ability to customize help content on a global level as well as an entity level.  Your content will then be surfaced by clicking the question mark icon at the top right of CRM. 


Depending on what entity grid or form you are on, CRM will either take you to the custom help URL specified for that specific entity or if a URL isn’t specified then it will take you to the custom help URL specified at a global level with context information passed in as a parameter.  If a custom help URL isn’t specified at an entity or global level then it will display the native CRM Customer Center.

To setup custom help at a global level:

  • Go to the System Settings in CRM (Settings –> System Settings)
  • On the General tab, scroll down towards the bottom to find “Set custom Help URL”


  • Set “Use custom Help for customizable entities” to Yes
  • You can now specify a URL in the “Global custom Help URL” field
    • This URL can also be a relative path to a custom web resource, for example: /WebResources/new_/help/content/global.htm
  • Set “Append parameters to URL” to yes if you would like the following context information to be appended to your custom URL
    • User Language Code: userlcid
    • Entity Name: entity
    • Entry Point: hierarchy chart or form
    • Form id: formid

To setup custom help at an entity level:

  • Navigate to the entity information in the solution
  • Check the “Use custom Help” box


  • You can now specify a URL in the “Help URL” field
    • This URL can also be a relative path similar to the global custom help, for example: /WebResources/new_/help/content/account.htm
  • Publish Customizations
Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

CRM 2013 Service Pack 1 Update Rollup 2 is Released!

Microsoft released the much anticipated Update Rollup 2 for CRM 2013 Service Pack 1.  The download page can be found here -  The version for this update will start with 6.1.2.

Microsoft didn’t hold back with this release.  The update is jam packed with over 100 fixes!  A few pesky Generic SQL Errors have been fixed, one that can occur when synchronizing to Outlook as well as a random SQL deadlock when trying to update Opportunity Products.  In addition, there are a variety of other fixes ranging from hard errors to performance issues.  For the full list of resolved issues, head to the KB article -

As always, be sure to install this update in a development or sandbox environment to test your functionality before installing it to production.

Deactivating records in Salesforce

One of the things we see and hear from clients who are migrating from Microsoft Dynamics to is that they miss the ability to just deactivate records rather than having to delete them. They would like to be able to keep their old data, but they only want to look at it when they want to do historical reporting. There are many ways to do this kind of ‘archiving’ of data, but today I’m going to talk about one approach we’ve used that relies only on the core Salesforce platform – no extra apps or licenses needed.

Tracking inactive records

Natively, Salesforce doesn’t have any concept of ‘inactive’ records for most entities. We can build in this concept by adding a custom checkbox field called inactive:


The idea here is that to deactivate a record, you can check this checkbox. We’ll also update any views in the system to filter out records with this checkbox by default, so users won’t see these records.

Global Search

With these few changes to our system, we can handle most of the basic use cases for our users in relatively little time. However, we do still encounter one problem:

If you create a record and set it to inactive:


And then search for the record from the Global Search, you still get the record back:


From this screen, you can’t tell if the record is active or inactive. Ideally we’d like to filter out inactive records from Global Search as well, but currently there is no way to do this. We have a couple of options at this point, depending on the client’s needs and wants.

One solution is to modify the Search Layout for each object to also include the Inactive field we added. While this doesn’t allow the users to filter the results, it does give them an indication of which records are active or inactive:


Then you can customize the filters for all users for a given object to include the Inactive field:


Once this is complete, when a user searches for the records, they will have the ability to filter out inactive records by manually updating their search criteria:




This solution is clean in terms of the data being stored and used as intended, but it does rely on the user actively checking the Inactive column or filtering out the results they do not want to see.

Using a workflow field update

Another common solution is to rename the record to something to indicate that the record is inactive, usually something along the lines of “INACTIVE “ + name. We can accomplish this with two workflows per object: one for when the record is marked inactive and another for when it’s marked active.

The inactive workflow will prepend the name with the word INACTIVE and looks like:



The active workflow will strip out the “INACTIVE” portion of the name whenever the record is reactivated, and it looks like:



As with all workflows, don’t forget to activate them after you have created them.

With these workflows in place, when we go to a record and deactivate it, the name will update:


And when we search for the record in Global Search we can quickly tell which records are inactive:


Updating the record back to active also works as expected:


Wrap Up

These are just two of the many options we have for tackling this kind of request. Neither is perfect since we can’t filter what records are returned by Global Search (vote for that idea here). Need something more complicated, or have a different issue you would like some help on? Contact us and we can help.

Topics: Salesforce

Customer Success: For Jones Lang LaSalle, Success Can Be Found in the Cloud

Jones Lang LaSalle (JLL) is a financial and professional services firm that specializes in commercial real estate services and investment management. With an impressive workforce of 52,700 employees spread across 200 corporate offices worldwide, JLL turned to CRM to improve visibility into the core business of real estate availability. But with their original out of the box solution, sales reps found CRM to be cumbersome and difficult to navigate. Information about real estate availability wasn’t always accurate within CRM and too much information on each screen was a point of confusion for end users. What they needed? A customized global deployment of Microsoft Dynamics CRM.

“If we are going to remain a thought leader in commercial real estate, it’s crucial that we not only have the right data analytics tools, but also have systems that are agile and flexible.”
- Greg Adams, Managing Director of Information Technology for JLL

Today, JLL uses Microsoft Dynamics CRM, SharePoint and Office 365 to get the job done. But for JLL to grow, they needed agility and flexibility - two things the cloud could give them.

The following is an excerpt from the full customer story published by Microsoft:

JLL used Microsoft Dynamics CRM on premise for several years, but is working now to add 3,500 Microsoft Dynamics CRM online seats to their current 2,000, allowing their offices in Asia, EMEA, Australia, the US, and beyond to have access to the same data analytics tools and more seamlessly integrate across continents. They envision their Microsoft Dynamics CRM system as a hub of information for their properties, accounts, and services so their people not only have the right information, anywhere, on any device, but also can be more proactive in their discussions with customers. The company is also planning to move its full Microsoft stack to the cloud, and is considering adding Microsoft Social Listening.

“With a company our size, you have to have customizations around business processes – both for individual offices and across the entire company.” Adams says. “As we look to the future, if it can’t operate in the cloud, we will probably look elsewhere.”

New Call-to-action


Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM Online