Sonoma Partners Microsoft CRM and Salesforce Blog

No Code Needed: Requiring Fields when Closing an Opportunity in D365

A recent requirement came up on a project to require specific fields when marking an Opportunity as Won.  The reasoning for this request is that you want your sales team to be able to quickly enter their opportunities without having to fill out a bunch of required fields.  However, you may also have specific fields that are needed upon closing the opportunity as Won, that you encourage your sales team to capture along the sales process.

At first, I thought that you could accomplish this by requiring fields in the last stage of the Business Process Flow.  Nope, that’s not the case.  Even if there are required fields in the BPF at any stage, users can go ahead and close the Opportunity as Won or Lost at any point.

Consider the Opportunity below.  Notice how Contact, Est. Close Date, Est. Revenue, and Budget Amount aren’t required.


However, you want this data captured before someone can mark the Opportunity as won.  You could invest in a developer and have them write a plugin to prevent save, but that would be costly.

The easy “no code” option is to use a Synchronous Workflow.  Head over the Settings –> Processes to create your new workflow.  Make sure to uncheck “Run this workflow in the background (recommended)” in order to make the workflow synchronous (or in other words, the Opportunity form won’t refresh until the workflow has run and completed).  This is key, because we’ll add a step in the workflow that will prevent the save, if our fields aren’t populated.


Your workflow would need to run After the “Record status changes”, and it will only need three steps:

  1. A Check Condition that will continue if the Status is set to Won.
  2. A Check Condition that will look and validate that all required fields have data.
  3. A step to stop the workflow as “Canceled” with an error message, if one of the required fields is missing data.

The overall workflow would look something like the following, along with the individual steps:





Now, when someone attempts to close an Opportunity as Won with those four fields above not populated, they’ll receive an error message as shown below.  All of this was done without a single line of code, and should the business requirements change and warrant future modifications, you can easily hop back into the workflow and make those changes quickly.


If you’re looking to leverage Dynamics 365 to better monitor, track, and move through Opportunities, let us know! We’d be happy to discuss your existing environment and how we might be able to help.

Contact Us

Topics: Microsoft Dynamics 365 Microsoft Dynamics CRM Microsoft Dynamics CRM Online

Spring '18 Puts Duplicate Detection to Work For You

Today's blog post was written by Troy Oliveira, Principal Architect at Sonoma Partners.

CRM systems are all about the data they contain and insights that they provide to users. Good data keeps an organization moving smoothly, but bad data can stop users dead in their tracks.

In Spring ’18, Salesforce has added another feather in the cap of Salesforce administrators when it comes to managing duplicate data: the Duplicate Data Job.

Salesforce already has strong means for proactive duplicate detection at the desktop or mobile application level by either completely blocking duplicate data or at the very least warning users that they are creating duplicate data. However, depending on a various number of factors such as sharing rules, Lightning Sync and API interactions, duplicate data can creep in to even the best of Salesforce implementations.

Until now, if you wanted to be able to periodically check for duplicate records, you would have to use a third party duplicate management tool. With Spring ’18, Salesforce released the Duplicate Data Job to Performance and Unlimited edition customers. This new job type allows for you to analyze your CRM data by executing a duplicate detection rule against your existing data.

Let’s take a look at how it works.

First, I’ve created a set of duplicate Contacts, all named various versions of John Doe.

Salesforce Duplicate Contacts
Click the image to expand.

Next, since my users have reported seeing a lot of duplicate data, I created a new Duplicate Detection Rule.  My new rule performs fuzzy matching against First Name, with an exact match against Last Name.

Salesforce Duplicate Rules
Click the image to expand.

Now that this is in place, users will be alerted when they try to create a contact that potentially already exists. But what about my existing data? That’s where the Duplicate Detection Job comes in to play. The next screenshots show navigating to the Duplicate Detection Job setup menu item and kicking off a new job by selecting a duplicate rule to evaluate.

Salesforce Duplicate Jobs
Click the image to expand.


Salesforce Duplicate Detect
Click the image to expand.

Depending on how much data you have, this process could take awhile. I would recommend executing these types of jobs during non-business hours, if possible, so that it doesn't risk adverse effects on your users.

Salesforce Duplicate More Jobs
Click the image to expand.

Once it has completed, you will see that the job has moved into a completed status.

Clicking into the job will give you an overview of the data that has been compared and how many potential “duplicate sets” it has found. A duplicate set is a group of records that the job has deemed could be duplicates of each other.

Salesforce Duplicate Jobs Setup
Click the image to expand.

You can then click the menu to the right side of the grid and view the duplicate sets that have been discovered.

Salesforce Duplicate Job Summary
Click the image to expand.

From here, you will be able to see the duplicates and merge records that need to be merged.

Salesforce Duplicate View
Click the image to expand.

Salesforce Duplicate Compare
Click the image to expand.

Salesforce Duplicate Merge
Click the image to expand.

Woohoo! Now I've got fewer duplicate records.

Salesforce Duplicate Related
Click the image to expand.

BUT, you’ll also notice that not all of the duplicates that I created were actually tagged as duplicate records.  This brings just a word of wisdom.  Duplicate matching is only as good as the rules that you create and the system executing the rules.  Salesforce’s fuzzy match saw that Jon and John were likely duplicates, but could not match Jonathon to either of those.  This goes to prove that duplicate management is not an exact science, it is definitely an artform and may take complex rules or attacking duplicate data from multiple angles to get it right.

I am excited to see how much customers use this in real life applications.

Topics: Salesforce

The ABC’s of CPQ – Part 2: Efficiency through Knowing How to Administer

Today’s blog post was written by Justin Concepcion, Diego Gallego, and Troy Oliveira at Sonoma Partners.

Salesforce CPQ (formerly Steelbrick) is one of the most advanced Configure-Price-Quote software available on the market today. Built natively on the Salesforce platform, it can drastically improve the efficiency of your sales organization with fast and easy quoting that leads to more revenue for your business.

In this 5-part blog post series, we breakdown the “ABC’s of CPQ,” listing out the most notable functionalities, features, and best practices of this impressive platform. In Part 1, we covered features from Advanced Approvals through Discount Schedules. Next up are letters “E” through “K”:

E is for Efficiency


Gone are the days of spreadsheets and long approval processes. Combining the rules-based logic of a CPQ platform with the power of Salesforce, salespeople can quickly and easily create quotes and submit them for approval without ever having to navigate between applications. Efficiency means that quotes that used to take days or weeks to complete can be reduced to hours, all with higher accuracy and more oversight than ever before.

F is for Favorites


Whether due to word-of-mouth popularity or customers that just want “the usual,” some products are sold more frequently than others. Favorites can help save time when selling these products by letting the user set a product, or a group of products, as a “favorite.” From then on, you can easily add those favorited products to your quote with a simple click of the button. Anyone who finds themselves selling the same products over and over again will want to use Favorites and will find it to be a huge time-saver.

G is for Groupings and Guided Selling


Groupings allow users to group together Quote Lines in their Quotes and set a name and description for each group. This helps users organize their line items into categories that make sense. Groupings can also help users save time by applying discounts, mark-ups, or changes to any Quote Line field to the entire group at once. While users can create and manage their own groups for their quotes, administrators can also set up default groups known as Solution Groups. Businesses selling products that easily fall into a few categories will especially find this feature of value.

Guided Selling

Guided Selling allows administrators to set up Quote Processes that will recommend products to sales reps based on what the user inputs. Users can first select a Quote Process, and, Guided selling_ABCsofCPQ from there, answer a series of questions that will ultimately show them the products they are looking for. For example, a business that sells notebooks might have a large variety of models of notebooks. To help sales reps select the correct model of notebook they need, they can use Guided Selling to input a paper size, cover type, etc. to find the right model. Businesses that sell many variations of the same product will find Guided Selling very helpful, ensuring that sales reps add products correctly and quickly to their quotes.

H is for Hierarchy and High-Volume Quoting


Products in Salesforce CPQ can be part of a hierarchy through bundles, where some products can be added to one bundle product, and that same bundle can be nested into an even larger bundle product. To help sales reps keep track of this hierarchy, enabling the “Visualize Product Hierarchy” package setting will add indentations to the product names in your quotes to show this hierarchy. Any organization with more complicated bundles will want to enable this setting to help their sales reps visualize their product hierarchies.

High-Volume Quoting

Timing is very important in order to keep up with high volume sales at your organization.. Your sales team needs to be able to grow the business by quickly providing accurate quotes to new clients while still making sure not to neglect existing customers. CPQ’s MassQuoteDocumentSender functionality will let your organization automate the process of generating and emailing documents to  existing customers. It is possible for a developer to create this functionality if you don’t have Salesforce CPQ, but using the built-in tools will allow you to schedule automated execution as needed so that Primary Contacts will be sent Renewal Quotes in short order.

I is for Inherited Pricing and Imports

Inherited Pricing

Inherited pricing means another less thing to worry about – if you have children accounts under an account with contracted pricing, those accounts will automatically obtain the contracted pricing from the parent account.  No need to worry about manually configuring the children accounts with the same pricing. A big distinguisher with CPQ though is the ability to rely on the account hierarchy for the pricing, or treat each account individually. In the case where a child account has its own contracted pricing, there is no need to rely on inherited pricing – Salesforce CPQ allows for the contracted price on the account to override the inherited one.


Sales reps may need quote lines from older sales systems brought in to their Salesforce CPQ quotes. Rather than recreate them, CPQ can be configured by an Admin to allow self-service: the sales person can use a CSV format to import Quote Lines (many at a time) and continue their quote within Salesforce CPQ. The quote lines can then be used going forward, leveraging the power of Salesforce CPQ with no additional administrative or programmatic need to configure, and the sales rep has exactly the quote lines they need.

J is for “Just How I like It” (Field Sets) and “Jump for Joy Because of More Sales”

“Just How I Like It” (Field Sets)

Every customer is different. Utilizing the power of Salesforce Field Sets, companies can tailor the CPQ line editor to their needs. Need a new field? Add it to the Field Set. No need to call a developer to add more code. Salesforce CPQ even allows for companies to set up different Field Sets for different sales processes, given the sales team what they need to see when they need to see it. Every company has their own unique requirements, and no two implementations of Salesforce CPQ are going to look the same. Customizing the Field Sets is something that every company should do.

“Jump for Joy Because of More Sales”

Being able to quote quickly and accurately is just as important as providing the right product for your customers. If sales teams can reduce the time it takes to produce a quote, not only can they get the quote in their customer’s hands sooner, but they also have more time to spend focusing on generating new leads and opportunities. Streamlining the quote generation process allows sales teams to focus more on selling and building relationships with prospects and customers and less time filling out paperwork and handling the boring task-driven side of their job.

K is for Knowing How to Administer

Knowing How to Administer

At its core, Salesforce CPQ is based on the same “Clicks Not Code” foundation that Salesforce was built upon. That means that the Salesforce Admins out there can keep their CPQ implementation up and running largely without high development costs. Nearly everything that most companies will need to do with CPQ can be done within the data driven architecture or making use of native Salesforce configuration, field sets, approval workflows, assignment rules, etc. To supplement the native know-how of a good Salesforce Admin, Salesforce CPQ provides a very active knowledge base and community of uses to help get questions answered and provide the details necessary to keep the wheels running. You can find them at  This is also an excellent place to go to find out information about new releases.


Stay tuned for the next post in our series to read more about the features Salesforce CPQ can offer for fast and efficient quoting.

Questions or looking to get started? Contact us.

Topics: Salesforce

The Core Group, CRM, and Change Management: A Recipe for Sales Success

Today’s blog post was written by Kayla Silverstein, Marketing Specialist at Sonoma Partners.

The Core Group is one of the top four national food service agencies in the United States, selling to operators including hospitals, schools, the armed services, and hotels. They employ 1,200+ people with 52 offices nationwide, and their sales reps support many of the leading Consumer Foods Brands.

The food brokerage industry has been largely consolidated in the last five years. The Core Group acquired more than 15 companies in the past two years alone. Amidst all of this consolidation, food manufacturers demand more information on how their products are sold and the value that The Core Group provides them. These demands, coupled with the organizations’ rapid growth, drove the need to standardize technology across the business. Prior to working with Sonoma Partners, The Core Group owned four different, disparate instances of CRM. Add a widespread use of spreadsheets and you can understand why they lacked visibility across sales regions.

Sonoma Partners deployed a single iteration of Salesforce across all divisions and outlined a change management and national training program. We sat down with Michael Freed, VP of Sales Technology, to discuss the project, how the training sessions are going, and what’s next for CRM and The Core Group.

What motivated you to consolidate systems and invest in a single CRM platform?

Freed: Our customers expect cohesiveness. You have to be able to work as one no matter how many offices and clients you have. We wouldn’t be able to meet these expectations if we didn’t invest in a single CRM platform.

The core groue quote blog img

Sonoma Partners built us an Envision plan (CRM Roadmap) that looked at our requirements, our use cases, and our people to design a CRM deployment strategy specific to us. Our biggest challenge from our initial planning in Philadelphia was to build a platform that would allow for 100 % adoption of the system across all Division of the company. Sonoma Partners has a great model that puts their consultants in the front seat to get better insight into how we do business here. I really believe it’s made a fundamental impact on the system’s architecture and its subsequent adoption.

Sonoma Partners also helped us operate off of a crawl, walk, run strategy. This ensured we didn’t take too much on at the start of the project, over-engineering the design and functionality at the risk of missing out on the quick wins and getting everyone up and running with the basics. This method really resonated with my team and our users, and we’re pleased with the results. I continuously tell our users that we need to get the fundamentals right. I want our employees to get used to the system, get the basic steps right, and reach out if they have questions. Once we get everyone up and running with the basic functionality, then we’ll move into more strategic efforts.

What are some of the items next on your list to tackle with Salesforce?

Freed: I’m really interested to see how Salesforce can be optimized for our more specialized use cases. For example, our K-12 team works with food distributors to sell primary schools. For this division to use Salesforce, it will probably require different dropdowns and timelines to report. I’d love to see CRM reflect these differences. As we become a more specialized organization, I look forward to adjusting CRM accordingly.

How well has the system been adopted so far?

Freed: It’s been an interesting process. There’s always a lot of trepidation about moving onto a new system. Historically, this industry has combatted a lot of bad software, and some people still have a bad taste in their mouth. Getting our leadership engaged was instrumental in driving user adoption. Sonoma Partners helped us develop messaging that illustrated how CRM was just one piece of the puzzle in making us a better organization overall. It’s not about adding process to our work; it’s about meeting new industry standards and exceeding our clients’ increased expectations.

The second thing we’ve done is create a system that we believe is better than everything else out there. We’ve added a mobile app that allows people to access the system on-the-go. They’re not working on the weekend just to log their calls, or trying to remember a page worth of notes six days later. With the mobile app, we’ve created more immediacy in our call reporting. This is essential to improving our operations moving forward and making us more proactive, instead of reactive in our work.

Lastly, we’ve adjusted our training process along the way, ensuring people walk out of our sessions with a better sense of what to do and how to do it. We have adjusted the sessions from the feedback we received in the surveys Sonoma Partners built for us. Now we can focus on teaching our employees how to integrate this new software into their daily tasks. We are nearly finished conducting training sessions around the country and we’re very happy with how things are shaping up.

Did you feel the training plan Sonoma Partners helped set you up for success and evolve over time?

Freed: I think the training model was built properly and in a way that when we got in front of 50 users at a live session, we can be flexible and interactive to the needs of our sales team and adjust from there. It’s not a textbook approach to training. It’s iterative and responsive to what works for our people and culture.

How do you feel your role as a sponsor has impacted the change management process?

Freed: I see myself as responsible for keeping the momentum going between all parties. To be a conduit between senior leadership, our users, and the technology platform with Sonoma Partners. If you picture a wheel with a lot of spokes, my job is to keep the wheel turning. I think it’s important to view my role in this global manner for the purpose of monitoring our overall progress.

What tough decisions have you had to make during this implementation process?

Freed: I think the toughest decisions revolved around the details that went into the initial deployment, and how much we wanted to put into the system from the beginning. CRM systems never stop evolving. I’ve talked to many people at our organization who have different ideas for how to do something, or what they want the system to be able to do.

Again, you need to be careful that you’re not trying to run before you can walk. You need a system that will last and stand the test of time, and then add layers. You don’t want to take layers away because you went too far, too fast. I think the challenge is to not react to every demand and make sure we build something that’s sustainable at first with the basic fundamentals, and then grow and strategically expand from there as we grow as a company.

What would you consider a measurement of success for the system once it’s up and running?

Freed: When it comes to training, I’ll know its successful when everyone is following the same disciplines in their reporting. In the long term – which is more exciting to me – is how we take this technology and make it a strategic instrument for ourselves and our clients so that we’re providing value every day. The true measurement of success will come when we provide better results to our clients by making more strategic calls as a result of what we’re doing in Salesforce.

Now that you can tell that story of cohesiveness, how have things changed?

Freed: It’s a door opener for us. We’ve already had conversations with several industry leading  clients based on the fact that we’ve deployed Salesforce and are making steps to bring our business units together. The next step will be integrating our systems with our clients, and we’re quickly moving in that direction.

How does CRM help you better compete?

Freed: It’s a necessity. Our competitors utilize their technology as their lead in. For the Core Group, we believe our winning edge begins with our people centric culture and sales execution. Our CRM platform is a great tool for us to facilitate our execution strategy.   If we aren’t consistent in how we’re reporting to our customers, it becomes clear that we have gaps in our cohesiveness as an organization. Now that we have that cohesion, we can compete more effectively. And now that our system is built better than anyone else’s – thanks to Sonoma – we can not only play alongside our competition; we can surpass them.

How do you see the future of CRM in your industry?

Freed: It’s essential. We’re in a data-centric world right now, and our clients are constantly seeking data insights. The Core Group is essentially a sales call factory. We sell to distributors who sell to end users – we’re not in the direct selling business.  But now the industry is shrinking the gap. We have the data to tell us how to best use our time and make the best calls possible. We’re defining new roles within our company to support this. With more prescriptive data to make more strategic sales calls, we are now providing the tools to be more effective in executing against it. That’s where the future is: how do we maximize our effort and plan our effort. The industry is evolving to make sure our work matters to us and our clients, and CRM is the platform to help us get there.

Our thanks to Michael Freed for taking the time to discuss their project with us. If you’re curious how your company could improve with a new deployment of CRM, let us know.

Topics: CRM Best Practices

9 Wins for Manufacturers Using Mobile CRM – Part 4: Day Management

Today’s blog post was co-authored by Kayla Silverstein, Marketing Specialist at Sonoma Partners.

Our mobile manufacturing blog post series outlines the ways in which manufacturing firms can benefit from using CRM on devices. So far we’ve covered how mobile surfaces the information that matters, and we’ve looked at examples of companies using mobile CRM to manage data on-the-go. Most recently, we discussed how CRM mobility can increase revenue for your organization. Today’s post covers how CRM mobility can monitor and manage the day-to-day activities for your field sellers.

4. Day Management

The tools you invest in as an organization reflect how you plan to enable growth and increase revenue. With mobile CRM, sellers can order samples and close purchase orders the moment they happen, ensuring that your customers receive their orders in a timely manner. Getting orders to your CRM and ERP systems as soon as possible also enables a better service experience for your customer. They can complete report logs, optimize their day’s schedule, or quickly access marketing and product collateral.

Increase Productivity

Whether configuring the native CRM mobile solutions or developing your own custom mobile applications, these solutions empower sellers to be more productive with their day and interactions with CRM. For instance, your on-the-go reps can log notes, store product or service case images directly to Account records, capture competitive intel, and view nearby Accounts right from their phone or tablet. Users can quickly create activities that are fully integrated with the native email and phone apps on the device. By leveraging both user and design experience, you create simple and elegant interfaces that meet the needs of your sellers, while allowing them to work faster. Ultimately, this translates to more sales for your organization.

Mobile CRM_img4 (002)

Streamline Efforts

Build your custom mobile application in a way that’s specific to your sellers’ use cases. For instance, if your sellers conduct surveys in the field or evaluate potential opportunities, a mobile CRM solution can make a big difference. Mobile CRM solutions can prompt next activities or provide meeting agendas, and then follow-up automatically with employees at your organization headquarters to move opportunities along quickly and efficiently.

Customer Example: Hisco

Hisco is a specialty distribution company serving a large number of industrial markets, including aerospace/defense, medical, and electronics. Hisco’s previous CRM integration was not well implemented or adopted due to inefficient custom development and slow load times. By investing in Salesforce and Salesforce1 mobile application, Hisco provided their sellers a value-add system that enhanced their sales efforts. The new system fully integrates with ERP data and surfaces that information in the mobile application, providing additional value for those traveling sellers.

Stay tuned for more wins for manufacturers who invest in a CRM mobile application. If you’re interested in learning what might be possible at your organization, contact us.

Day in the Life: Meet Tom

Today’s blog post was written by Kayla Silverstein, Marketing Specialist at Sonoma Partners.

No two days are alike for a Sonoma Partners Project Manager (PM). We interviewed Tom Demana to get a “snapshot” of what it’s really like to be a PM at Sonoma. In this post, Tom shares his thoughts on his favorite aspects of Sonoma Life and what he thinks it takes to be successful on the Sonoma Partners project management team.


How would you describe a typical day in the life of a Sonoma PM?

Tom-sonomapartners-3Tom:  Every day is different. I try and schedule as many of my client team meetings as I can early in the week. I find this gives the project team more time later in the week to go heads-down and pump out our work. My personal work could be anything from making a project document to planning future work with a customer, or getting hands-on and doing CRM customizations. It’s hard to describe a typical day just because there really isn’t one as a PM at Sonoma Partners – and for me, that’s the best part! Each client is different, each CRM use case has its own unique spin – there isn’t anything repetitive in my day-to-day, and I love that about project management at Sonoma Partners.

What is your favorite part of working at Sonoma Partners?

Tom: I know it’s said again and again in these “day in the life” blog posts, but I’d be lying if I didn’t say the people.  Sonoma truly does have a wonderful culture and even what I would call a community about it. I really feel like I get along with everyone, and they’re fun. It’s not just tolerable people here – they’re interesting people with unique lives and hobbies that make traveling for projects amusing and not just mundane travel for work. These are very smart people but with the openness to want to teach and learn from you as well. It makes even the more challenging of projects enjoyable when the team that has your back are people you respect, trust, and enjoy. Tom-sonomapartners-10

I would also say our “SWEET” policy. Being a PM can sometimes feel a bit like being a doctor on call for patients. If it’s late but a client needs something desperately, I’m up and on my computer. With “SWEET,” I can work extra one day, and if it’s a bit slow on a Friday afternoon, I can flex my hours and call it an early weekend. I love that Sonoma Partners respects the time of its employees and understands that this is not a regular 9 to 5 position all of the time.

Tom-sonomapartners-7What is your favorite part of being a project manager at Sonoma Partners?

Tom: I really like the structure and methodology in place on our project management team. We have a methodology that we use as a framework, but we don’t pigeon-hole ourselves into doing the same thing for each client. Every customer you meet has a different business model. I can tap into what I know has worked in the past and modify from there. I like that Sonoma Partners encourages and respects that method.

What is your favorite Sonoma perk?

Tom: Taco Tuesday (free tacos on the first Tuesday of the month) is one of my favorite perks. Everyone gathers in the lunchroom for make-your-own tacos, and you get to catch up with people you may not have seen for a bit.

What advice do you have for future Sonoma PMs?

Tom: Be flexible. We try and do things in an organized manner, but no customer is totally like another. Be comfortable thinking on your feet. Be honest and transparent with your clients. They’ll appreciate your sincerity and trust you all the more for it. Also, remember that you have a really strong team that has your back. If you’re feeling confused or struggling to answer a question, connect with your tech lead. Don’t just shoot off an email; pick up the phone or visit someone if they are in the office. Talking through the issue usually resolves it the most quickly. We have amazing people here, and not all of the weight of the project falls on your shoulders.

What do you think it takes to be a successful PM?

Tom: Strong communication skills. It’s important to know when and what to communicate and to be mindful of how you involve your client and your team. It also takes a strong attention to detail and the ability to juggle multiple priorities. A project manager can have several clients at once, and they’ll need to know how to best manage all of them in a manner that makes them all feel like they’re your only client.

Are you interested in joining our project management team? We’re hiring!

Topics: Careers at Sonoma

Dynamics 365: Speeding up API Access with the Async Service

Today's blog post was written by Angel Shishkov, Development Principal at Sonoma Partners.

When we need to do a recurring custom calculation or integration in CRM, we usually build a console app, or Azure Job. These solutions run on a schedule and use the CRM SDK along with a service account to connect to CRM and perform the necessary retrieves, creates, and updates. Since these are external to CRM, there is some performance overhead when data is sent over the internet to the CRM server.

It is generally much more efficient to interact with CRM on the server-side; through plugins, workflow activities, custom actions, etc.

I was wondering how much more efficient and how feasible this would be, so read on to find out.

Setting up a test scenario

I specifically wanted to test how the CRM Async Service will perform as a substitute to a recurring calculation job. The theory being that the Async Service physically lives very close to the CRM database (in the same data center, most likely) and will therefore have much lower overhead when transferring data. On top of that, the Async Service does various caching and other optimizations, that allow it to connect to the database without going through the normal authentication steps that a console app would. So, I wanted to test a bulk update scenario using a console app, versus the same scenario using the Async Service, and see how much of a difference in performance there was. If you’re not interested in the technical details, scroll down to the Results section.

The test scenario I chose was a mock case of reading data and creating records. The requirement would be to read some data from CRM, with a FetchXML query, then create a small record with the results of that query. We would then do this several thousand times. This roughly simulates a bulk calculation scenario (like a custom calculated field that is refreshed daily) or an integration scenario (reading and/or writing to CRM).

For the query, I used a sum aggregation of the extendedamount of all the salesorderdetails in the system. Basically – get the total amount of all the Orders in CRM.

For the record creation, I used a custom entity with two fields; an Index field to hold the index number of the record and a Total field to hold the calculated total amount. The Index was just incremental numbers, starting at zero and the Total amount was always the same value repeatedly retrieved by the query above.

Implementing the console app

The console app was a basic application using the CRM SDK to create a connection to the server and perform the queries and creates. It loops 20,000 times and each time it runs the aggregate query, gets the resulting sum, and creates a new_loadtest record with that sum as the total and an incremental number as the Index. I decided to use ExecuteMultipleRequest in batches of 100, since this approach is standard for these kinds of apps and it would be an unfair comparison not to use it. Here is the loop code:

Implementing the async job

The async service implementation was more interesting. The idea here was to leverage the CRM Async Service to do the work, so we would need an async plugin. CRM Online has a 2min timeout on server-side custom code and this includes plugins, workflow activities, etc. On top of that, CRM has a mechanism to detect and prevent infinite loops on the server side where a component could trigger itself indefinitely, like a plugin that fires on the creation of a record, which triggers itself again by creating a new instance of that record.

Based on the above, it becomes difficult to write an async plugin that runs for more than 2min, so the work would need to be broken up into chunks. Since the test case was very simple - run the same fetch query, create a record with an incremental index – I opted for a simple approach as well. I created a new_asynctrigger entity with a new_startindex and new_endindex field. An async plugin would fire when a new_asynctrigger record is created and process the indexes between start and end in one chunk, the same way the console app above did – run the same fetch query, create a record with an incremental index. A separate console app would be needed to create these new_asynctrigger records with the correct start and end index, so that the Async service can be triggered. This is definitely an overhead, compared to the pure console app approach. Furthermore, we need to keep the chunks small enough that each can be processed in under 2min, plus a generous buffer for safety. In this case I used a chunk size of 1000.

Note that the plugin does not use ExecuteMultiple, like the console app does. Since the Async service executes multiple jobs in parallel, we could trigger the CRM ExecuteMultiple throttling (2 concurrent threads max) and cause our Async jobs to error out.

Here is a snippet of how the console app creates new_asynctriggers.

And here is the async plugin code that processes each chunk.


To summarize, we have a console app going up against the Async Service in the slightly unfair race to query CRM and create records. It’s like one of those timed cooking challenges, except one cook is in the kitchen and the other one starts five blocks away.

Let’s summarize the pros and cons, only as related to speed and efficiency, of the two approaches.

Console App


  • Needs to only connect to CRM one time, and can reuse that same connection.
  • Can create all the records in one loop, does not incur overhead to chunk records.
  • Can use ExecuteMultiple.


  • Communicates with CRM over the internet, which involves network latency as well as the performance overhead of accessing the external API.
  • Cannot run more than 2 threads in parallel. By default, CRM Online allows 2 concurrent ExecuteMultiple requests. In this test, I did not implement any concurrency.

Async Service


  • Has an internal connection to CRM that does not require the usual OAuth handshake.
  • Presumably communicates with CRM over an internal network with much lower latency and higher bandwidth.


  • Requires breaking up records into chunks, as it can only process 2min at a time.
  • Requires overhead of creating records in CRM to trigger the async plugins, because of CRM’s infinite loop detection.
  • Does not use ExecuteMultiple, creates records one at a time.


As I stated in the summary, this test strongly favors the Async service. All of the “work” is accessing CRM, not external systems or databases and the requests to CRM are small and numerous, which is bad for the overhead incurred by a console app. Either way, I was a bit surprised by the results.

Console App

On average, 20k iterations completed in 74min.

Async Service

On average, 20k iterations completed in 52sec.

That seems like a very large difference. The two main inequalities I think, are the level of parallelism and the speed of CRM access. The console app runs one thread, while the async approach quickly creates 20 jobs (20k records / 1k chunk size) that are queued to execute together. I can’t say for sure how many of those run in parallel inside the Async service, but likely quite a few, if not all of them. The rest can be attributed to much faster access to CRM from the Async service.

Overall, I wouldn’t recommend using the CRM Async service to process large migration data, as that is not its function. For smaller integrations or recurring calculations, it seems to be clearly the faster choice, but because it is not fully under our control, I would still tend towards the console app/Azure job approach, unless there is a specific performance limitation that needs to be addressed.

Thanks for reading!

Topics: Microsoft Dynamics 365

Unable to Login to Dynamics using the SDK?

Today's blog post was written by William "Dibbs" Dibbern, Development Principal at Sonoma Partners.

We recently noticed that we were unable to login to a couple Dynamics 365 Online instances using any of our WPF or Powershell-based tooling that leverages the Microsoft.Xrm.Tooling.Connector NuGet package . We received the error "Unable to Login", which if you've used the Xrm Tooling Connector lib before, you could mean anything. Since nothing had changed recently, we tried it in LINQPad and it worked, mysteriously. You know what that means: let the debugging games begin!

If you'd like to follow our process for solving this then keep reading, otherwise if you just want to know the resolution, skip on down to the end.


After inspecting the network traffic during connection using Fiddler, we noticed the failure was occurring during the CONNECT request to the API, and it was failing multiple times. Upon inspecting each request we found that our code was sending out a CONNECT for TLSv1 then failing back to try SSLv3 as you can see in the screenshot below.


Neither TLSv1 nor SSLv3 are supported online now according to this bulletin from the D365 blog: Updates coming to Dynamics 365 Customer Engagement connection securityThat blog post notes two options to resolve any potential issues stemming from the upgraded security, both of which have their pitfalls:

  1. Update your code to leverage .NET 4.6.2+: The update in .NET 4.6 that this alludes to is to try more secure protocols before trying older, less secure, protocols (TLSv1.2 would be tried before TLSv1.1). However, our code was already on .NET 4.6.2 so this suggestion was ultimately unhelpful for us.
  2. Update your registry settings: Potentially a good resolution for some, but we prefer to make as few changes to systems we deploy our apps to as possible, and we were sure there had to be another way around this that we could control from code.

Based on those hurdles, we went back to the drawing board. After a few quick searches, we stumbled upon a couple of very helpful StackOverflow posts.

This question .Net Framework 4.6.1 not defaulting to TLS 1.2 pretty much cut straight to the heart of our predicament. We're on .NET 4.6+, why is it still not working? The most upvoted answer gives the reason. .NET 4.6.2 doesn't have a default set of enabled security protocols it seems, so the default could be different per environment our code could run on.

This led us to making sure that the ServicePointManager.SecurityProtocol setting was set such that TLSv1.2 was in the list of available protocol options, regardless of any default environment settings. We found several posts suggesting we set the value explicitly such that ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;. However, the other StackOverflow post we found had a better answer.


In the end, we agreed with the most upvoted answer in the last StackOverflow post we found which recommended only enabling the protocols we actually care about instead of explicitly restricting ourselves to TLSv1.2. This ensures the least potential side effects. System defaults are minimally modified for our execution context, and any future protocols that are added would still be available to use (in theory). As our two troublesome environments in which we originally experience the error had only TLSv1.1 and TLSv1.2 left off of the defaults, we decided to turn them both on. This combined with the update to .NET 4.6.2 ensures that TLSv1.2 is tried before any less secure protocols, but that all are available if needed.

How this is implemented is by adjusting the ServicePointManager.SecurityProtocol setting as needed. As described, we wanted to turn on TLSv1.1 and v1.2, so we added the below line once per application. We inserted it generally right before we initialize our CrmServiceClient object, unless of course we're instantiating multiple. The point is, you only need to do this once if no other code in your execution context is changing this value.

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

The same principal can be applied in PowerShell, as needed.

Final Thoughts

A couple of fellow devs noted during our research that this doesn't seem to be a problem with Console Applications, and we also noted at the start this wasn't an issue for LINQPad scripts. What's up with that, right? For whatever reason, in those environments, TLS 1.2 is in fact included in the list of available security protocols by default. That said, the point here is that it isn't always enabled by default. So if you cannot be sure where your code is being run, the safest bet is to turn on the protocols you know you need before trying to use them.

Topics: Microsoft Dynamics 365

Dynamic Forms (Community Edition): Now Available in AppSource

Today's blog post was co-authored by Ross Talbot, Development Principal at Sonoma Partners.

We are excited to have released our popular Dynamic Forms (Community Edition) to Microsoft's Dynamics 365 AppSource!


As a reminder, Dynamic Forms is a useful tool that bridges a gap between the evolving Dynamics Business Rules and custom form JavaScript by giving customizers a way to configure complex rules.

In addition to being generally available on AppSource, we have also updated the solution with the following enhancements:

  • Dynamic Forms now supports Customer lookup types
  • Some minor cosmetic improvements
  • Resolved issues with rules filtering values on an option set
  • Resolved issues with rule behavior when deployed to mobile devices

If you are new to Dynamic Forms, please read the article from our colleague, Justin, about the differences between Dynamic Forms and Dynamics 365 Business Rules. Also, a walkthrough can be found on our website here or a video is embedded on the download page on our website. Here you will find information on creating both simple and complex rules, as well as a list of features so you can see what options are available to you.

Still use Dynamics CRM 2016 on premise? Don't worry, we have you covered. Simply download the 2016 version and download from our website and enjoy!

Topics: ISV for CRM Microsoft Dynamics 365

9 Wins for Manufacturers Using Mobile CRM - Part 3: Increase Revenue

Today’s blog post was written by Kayla Silverstein, Marketing Specialist at Sonoma Partners.

Field sales teams at manufacturing organizations are doing the best they can to meet with prospective clients while pushing products at the ideal time and place.

Is your company providing your sales team with the best tools to work in the field?

An on-premise customer relationship management (CRM) system requires sellers to be in the office to access critical customer data. Why not invest in a tool that’s just as mobile as your sellers?

Over the next few weeks, we’ll share nine key wins for manufacturing companies using mobile CRM solutions. So far, we’ve covered the importance of surfacing information that matters and the advantages of data access on-the-go that mobile CRM provides. Now, it’s time to talk dollars and sense.

3. Increase Revenue

Mobile_CRM_blog_3_500x300At the end of the day, the tools you invest in as an organization reflect how you plan to enable growth and increase revenue. Manufacturers using mobile CRM can close orders on the spot, the moment they happen, ensuring that your team isn’t missing out on opportunities between sales calls.

Free Up Time

Custom mobile applications empower businesses to do incredible things with CRM. Free up time for your reps on-the-go when they can log notes, store images directly to Account records, and view nearby Accounts in CRM. Users can create Associated Activities quickly and fully integrated with the native email and phone apps on the device. By leveraging both user experience and design expertise, you can have a simple, elegant interface that meets the needs of your sellers, while allowing them to work faster. Ultimately, this translates to more sales for your organization.

Streamline Efforts

Build your custom mobile application in a way that’s specific to your sellers’ use cases. If you have sellers conducting surveys in the field or evaluating potential opportunities, a mobile CRM solution can make a big difference. CRM can prompt next activities and follow-up automatically with employees at your organization headquarters to move opportunities quickly and efficiently.

Customer Example: Brooklyn Brewery

Like most breweries, Brooklyn Brewery’s sales reps are not conducting “sales,” as much as they are monitoring product quality, building relationships with their buyers, conducting surveys, and assessing product placement. To enable their sellers to access customer data on-the-go, leadership invested in a mobile CRM solution.

CRM has brought a focus to Brooklyn Brewery’s sales organization. Their sellers can go onsite, research customer information onsite, and focus on the ultimate goal: helping Brooklyn Brewery grow their reach, sell strategically to their customers, and – of course – increase revenue.

Stay tuned for more wins for manufacturers who invest in a CRM mobile application. If you’re interested in learning what might be possible at your organization, contact us.

Topics: CRM for Manufacturing Enterprise Mobility