Sonoma Partners Microsoft CRM and Salesforce.com Blog

CRM Online Spring 2015 – Alternate Keys

With the release of CRM Online Spring 2015 Update, Microsoft delivered the ability to define alternate keys for an entity.  Alternate keys can be one or many attributes that are a unique combination of columns to uniquely identify a record instead of using the typical primary key.  Alternate keys can be made up from a combination of decimal, integer or string attributes.

Lets dig into how the new alternate keys can work in CRM based on a real-world scenario.

In my example we have an entity for States and our Contact entity has a Lookup to the State entity.  The State entity has an attribute called Code where it will store the unique two character abbreviation for the State such as IL for Illinois.  There is an integration with another system where Contacts will be passed to Dynamics along with the two character abbreviation for State.  Alternate keys work perfectly in this scenario as we can just associate the State record to the Contact record by using the State’s Code instead of needing to query to find it’s GUID.

In order to accomplish this, we first need to go to the customizations for the State entity.  Underneath the entity is a new link for Keys.

keys

Click New which will open a dialog and let you pick one or more keys that will make up a unique combination to identify a record.  We will select Code as a Key for our State entity.

newkey

Now with the SDK when updating a Contact record, in order the set a Lookup value we would need to use the EntityReference object and provide a GUID to a State record but with the latest Spring Update and the latest SDK, we can instead pass in a value for the Code attribute like shown in the snippet below.


Therefore if our integration sends us a Code for the Contact’s State such as “IL”, we can just update our Contact record using the “IL” value and avoid needing to do a query against the State entity to find the GUID for the IL State record.

One last thing to point out about alternate keys is that CRM will put a constraint on the entity to make sure the new alternate keys make up a unique identifier for the entity.  If you try creating a record with a duplicate set of alternate keys, you will see an error similar to the one shown below.

duplicate

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

How to Mass Update Business Process Stages

Today's guest blogger is Rachel Sullivan, a Senior Consultant at Sonoma Partners

CRM allows you to easily update fields on records using their bulk edit functionality.  Records that you can query and return back in a list/grid can all be edited using this functionality.

However, since it’s currently not a field on the Opportunity form, there is no way to update the Business Process stage using this native bulk edit feature.  However, fear not, as Sonoma is here to provide a workaround on how to edit this field using native export/import.

In order to update the Business Process Stage using this workaround, follow these steps below.

1. You’ll first need to find the unique identifier of each process stage (the GUID).   To accomplish this, use Advanced Find to identify the opportunities that you would like to update.

3. Edit the columns and include Process Stage

4. Click Results and from this view, you can see all of the unique Process Stages and their GUIDS

image

You will need to match each unique GUID with the Process Stage Name.  The easiest way to do this is to open a record of each unique Process Stage value, view the Process Stage name.  Do this for each unique Process Stage.

For Example:

  • d3ca8878-8d7b-47b9-852d-fcd838790cfd = Propose
  • 650e06b4-789b-46c1-822b-0da76bedb1ed = Develop

imageimage

5. Once all GUIDS are gathered, you’ll need to export the records that you’d like to update.  When doing this, make sure to check the box that makes the file available for re-import (note that with CRM 2015 Online Update 1, all records are automatically exported for reimport and this step isn’t necessary.  This should come to CRM 2015 On Prem in the fall).  Save the file locally and open it with Excel.

image

6. Once in Excel, copy and paste the GUID of the business process stage (that you’d like to change each record to) into the Process Stage column.  Save the file and import back into CRM.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2011 Microsoft Dynamics CRM 2013 Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

Customer Success Story: Grant Thornton

Sonoma-success-stories3

"In our business, relationships matter." - Rick Stow

Grant Thornton LLP is one of the world's leading organizations of audit, tax and advisory firms. Although their revenue is in excess of $1.3 billion and they operate in 57 offices across the globe, Grant Thornton hasn't set out to be the biggest accounting organization in the world.

They know they compete with four larger firms, thus being the biggest doesn't differentiate them from the rest of the crowd. What does? Establishing closer relationships and personalized service that earns credibility and increases value. Enter the tool that helps Grant Thornton build and nurture personalized relationships with their clients: Microsoft Dynamics CRM.

Prior to their Dynamics CRM implementation, Grant Thornton lacked visibility into their contact and account records, as well as information that spanned across multiple employees and practice areas. Maintaining various customer management solutions, including SalesLogix, proved to be a challenge that sometimes led to duplication of effort and missed opportunities.

Grant-thornton-blog

With one consolidated system, Grant Thornton is determined for their firm to maintain a meaningful relationship with each client in their CRM. Here are 3 ways their CRM solution helps them achieve this goal:

1. Commitment to Mobility 

A majority of Grant Thornton's employees spend a majority of their time outside the office, making the mobile component of their CRM project essential to their success. Not only did a mobile solution give their team members the functionality where and when they needed it, but it helped drive widespread user adoption - the key component of a successful CRM project.  

 2. Rise of Collaboration 

Relationships are everything in professional services firms, and people are very protective of their relationships and their contact records. Grant Thornton worked to overcome this mindset in order to understand the full scope of a client relationship. To foster effective collaboration, Grant Thornton integrated SharePoint, Lync and Yammer to promote a dialogue around client and account activities.

3. Enhanced Sales Processes 

Their new CRM solution accommodates different sales processes and regional requirements, helping to achieve the "One Firm" goal they had when starting the project. As collected data enters the CRM solution, employees can pinpoint the strengths, weaknesses, and threats of an opportunity. Because this information is centrally located and visible to appropriate parties - account managers can collaboratively develop a plan for pursuing the relationship. 

We worked with Grant Thornton for 11 months to create their custom Microsoft Dynamics CRM solution. Here are some lessons learned from their deployment: 

 Iterate: 

Don’t bite off more than you can chew. Your CRM project is ongoing and can be done in phases. It's okay to go live with fewer requirements and communicate broadly as you roll out additional functionalities. 

 Reduce the scope of the project: 

Don't go down the rabbit hole of adding on endless nice-to-have features. Most of your employees don't operate at that level of detail and if they do, they don't want to maintain a system that requires that much detail. Phase out the introduction of the system to drive widespread adoption.  

Are you ready to write your own CRM success story? We’re ready to help. 

Topics: CRM for Professional Services Microsoft Dynamics CRM Online

Summer ’15 – View Query Plan Notes

In a previous post, we talked about a (then pilot) feature of Salesforce that assists in debugging slow running queries. With the Summer ’15 release, Salesforce has improved this feature by allowing us to see any notes the query optimizer has for the highest ranked query plan (the query plan most likely to be used).

What This Means for Me

Ultimately this release is about empowering the developer to dig deeper into the platform and solve their own problems, without having to involve Salesforce support. This allows us to find and fix problems quickly, while reducing time spent in development (and therefore cost). While this isn’t a feature that most of us will use on a daily basis, it’s always good to have more options and information when things do go wrong.

Enabling Query Plans

By default, query plans (and therefore the query plan notes) are not shown in the developer console. To enable them, open the developer console and go to Help > Preferences and change the ”Enable Query Plan” options to true:

0

After saving, the Query Plan button will be displayed on the Query Editor tab:

1

IsDeleted

You might notice that almost every query you view the plan for will have a note of

“Not considering filter for optimization because unindexed. Table: {your table}: [“IsDeleted”]”

The reason for this note is that Salesforce internally appends IsDeleted = false to your queries when you use the normal Query endpoint (or SOQL without the ALL ROWS key words), which filters out any records in the trash bin. The query plan is telling you that this field is unindexed and therefore the query will not be optimized based on that field. In general you can ignore this note, since there’s not a lot you can do about it without contacting Salesforce. However, this does demonstrate that the query you send to Salesforce is not necessarily the actual query that gets run, and these notes are a good way to sometimes discover hidden issues that will let you open more intelligent cases for Salesforce support to assist with.

Topics: Salesforce.com

Integrating data with Salesforce via SSIS and CData

Introduction

A common need in the enterprise world is the need to be able to integrate data between disparate systems (ERP, POS, data warehousing, etc...). Increasingly CRM systems are becoming common-place in the mix of systems needing to be able to talk to each other, and one of the largest CRM systems in the market is Salesforce. Unfortunately, Salesforce’s size and breadth of scope can make it intimidating for developers to get started, and even figuring out how to connect can be daunting if you don’t already know where to look. Thankfully, there are third party drivers such as the one provided by CData that make this task easy, and let developers focus on business logic instead of Salesforce connections and APIs.

 Today we will be looking at how to integrate data with Salesforce using SSIS and CData’s SSIS driver.

Setup

SSIS

In this article, we assume you already have basic familiarity with SSIS and will not go through the setup steps for SSIS itself. We’ll be integrating Account data from a local database table in to Salesforce, and have set up the SSIS package to read the Account data as the first step.

Upsert Accounts

Retrieve Accounts

For our sample, we’ll use the following Account table:

Account Table

In this table, the Name field is the name of the Account, and the Id is the database generated Id.

Installing the CData SSIS-Salesforce driver

In order to connect to and interact with Salesforce, we’ll need to install a driver. We’ll be using the CData SSIS-Salesforce driver to accomplish this task, which you can download from their site. After downloading, simply follow the prompts to install and restart Visual Studio if you left it open.

Connecting to Salesforce

To begin, we need to first be able to authenticate against your Salesforce instance, which means we need Salesforce credentials.

Note: If you’re following along just for fun, you can sign up for a free Salesforce org from https://developer.salesforce.com/. The free developer org has lower data limits, but for our purposes is identical to most other Salesforce orgs you’ll need to connect to.

There are a few pieces of information you’ll need before you can continue further:

  • The salesforce username + password for the account you want to use as the integration account.
  • The type organization you are connecting to (Developer, Production, Sandbox, etc.)
  • An optional security token, depending on your organization’s security settings.

Gathering the username + password

This is the same as the username and password you use when you log in to Salesforce through the browser.

Gather the type of organization

A vast majority of the organizations you will have to communicate with will be one of 3 types: Production, Sandbox, or Developer. For our purposes, we only need to know if we are in a Sandbox organization. Generally you should be able to find this out by asking your Salesforce administrator, but you can also look in the setup menu to find this information:

Salesforce Edition

Gathering the security token

The security token is a random string of letters, numbers and symbols that is tied to your user’s password. It is needed when accessing Salesforce through the API if your organization’s security settings have not whitelisted your IP address. Generally this value should be provided by your Salesforce administrator, but if you don’t know it (or you have a new user) you can reset it.

Warning: Resetting the security token resets it for all applications using the account. If you have other integrations using this account, do not reset the security token unless you plan on updating it in all locations.

There are two places you go to reset your security token, depending on your organization version.

Through the Setup Menu

In some organizations, resetting your security token can be done through the Setup Menu:

Setup Menu

Reset Security Token Setup

Reset Security Token Setup Confirm

Through “My Settings” Menu

If you don’t see Reset My Security Token in the setup menu, then you need to go through the My Settings menu:

Reset Security Token My settings

Reset Security Token My Settings Confirm

Regardless of which route you need to take, once you click the confirm button you will receive an email from Salesforce with your security token.

Adding the connection to SSIS

Now that we have the required information, we can create a new SSIS connection. In the Connection Managers section, add a new connection of type CDATA_SALESFORCE:

SSIS Connection

On the following screen, fill in the Authentication portion with the information we just gathered. If you do not need a security token, leave the field blank.

The “Use Sandbox” field is where we use your organization type: if you have a Developer or Production organization leave this as false, if you have a Sandbox organization set this box to true.

SSIS Auth

SSIS Connection Test

Leave all of the other settings as their defaults and click OK.

Mapping the data

Now that we have a connection to Salesforce established, we can begin mapping your data from the database table to the Account object in Salesforce.

To start, we need to add a new CData Salesforce Destination:

CData Salesforce Destination

CData Connection Manager

Once you have the destination established, it follows the same conventions that most data mappings follow. You can pick from the input list, and map it to a field in the output list:

CData Mappings

Error Handling

With the mapping set up, we need to add error handling for any records that fail to be inserted. The simplest method is to log the errors to a flat file, which we’ll use for now:

Error Logging

Of course, since this is using the standard SSIS error redirection, you can add any logic needed by your business requirements.

Wrap Up

At this point, you have a fully functioning Salesforce connection, and can push data from your local database to Salesforce. Hopefully this walk through makes finding the connection information easy, and utilizing CData’s Salesforce driver for SSIS authentication allows for interacting with Salesforce in a straightforward manner. Using the driver makes integrating your ERP, web site, and POS systems with Salesforce easy, allowing you to keep your data in sync and ensure everyone is always on the same page.

Topics: Salesforce.com

CRM for AEC Firms: Proposal Generation and Document Management

Architecture, Engineering, and Construction firms have traditionally relied on separate databases to collect data on projects, manage financial information, and handle client accounts. Navigating these disparate systems makes it difficult for internal divisions to share and access important information needed for proposal generation and document management.

Some of the common business challenges that plague our AEC clients include:

  • Trouble managing multiple data sources
  • Navigating redundant and inconsistent data
  • No single view of clients
  • Difficulties making go/no-go decisions

If you're a marketer working at an AEC firm, we know that it can be especially painful to generate proposals and manage documents. But it doesn't have to be. With a well-implemented CRM solution, AEC firms can tame the proposal and document management beast.

1. CRM can track MSAs, NDAs, and Contracts

MSAs, NDAs, and contracts need to be stored in a logical and easy-to-find place. Instead of storing them in hard-to-navigate-to folders on a shared drive or in a Sharepoint labyrinth, use CRM to store and place them right against the project record that's complete with project data. While these documents don't do much for proposal generation, it's convenient to have these documents on hand so you know what you agreed to with the customer.

2. CRM can track employee skillsets and certifications and automate updates

All of the important employee information you need like project experience, trainings, certifications, trade association memberships, pictures, and more can be stored within your CRM.  Better yet, CRM can help automate the process of updating this information with automatic notification emails that tell employees to update their resume via an easy-to-use employee portal which guides them through the process. And if an employee doesn’t update their information in a timely manner, workflow can alert a manager or HR. If you want to get really fancy, project information can be automatically appended to employee records as they are staffed on a project or as projects wrap up.

3. CRM can aid in targeting the right pursuits and proposals

We know that proposal generation is a pain point for AEC firms. Since proposals are so expensive to generate, you don't want to waste time having Marketing develop them or have the BizDev team chasing pursuits that you have a low chance of winning. An unprofitable project could be due to the type of project, the geography and the local competition, the client itself, or any combination of these things. A CRM system can help AEC firms pinpoint where they can maximize their profits and minimize low profit pursuits. 

4. CRM can simplify proposal generation

We know that marketers at AEC firms are required to dig through multiple databases and work with multiple departments to get the information they need for proposal generation. You have to pull data from other marketers, HR, project managers, clients, the company shared drive, the company document management system, the financial system, and project management systems. With a CRM system, you have a central place where you can get the information you need for a proposal, collaborate on the document, track where the proposal is in your process, and have a logical place to store it once it’s complete. You can even have templates in the system to publish all of the project, employee, and other data in a proposal-friendly format.

Proposal generation and document management doesn't have to be a beast. There is an easier way. Want to learn more about the business benefits our AEC clients have experienced with CRM? Contact us to learn more about quick and easy proposal generation and document management. 

 

eBook - Top 10 CRM Evaluation Criteria
Topics: CRM for Professional Services

VIDEO: Sonoma Partners Relationship Mapper

The Sonoma Partners Relationship Mapper for Microsoft Dynamics CRM allows you to see who knows who and how. It's an easy, drop-in solution that you can just add into your Dynamics CRM instance to visually see which relationships exist in your system. 

 

Contact us learn more about Relationship Mapper for Dynamics CRM.

Topics: Microsoft Dynamics CRM

INFOGRAPHIC: 2015 State of Knowledge for Customer Service

Note: The following is a guest post from Parature, from Microsoft Sr. Product Marketing Manager Tricia Morris. Tricia promotes Parature's focus on customer service thought leadership and best practices through Parature's customer service blog. 

Customers’ expectations for brands and organizations delivering the right answer at the right time, whether through assisted or self-service, continue to grow. In the The Real Self-Service Economy Report, 70% of consumers surveyed now expect a company website to include a self-service application.

In the most recent American Express Customer Service Barometer, 99% of consumers say that getting a satisfactory answer or being connected to someone knowledgeable are important prerequisites to a great customer service experience. But while customers are expecting more, many brands and organizations are struggling with providing the knowledge agents and employees need to consistently deliver the right answers at the right time across all major service and engagement channels.

This infographic presents a snapshot view of the current state of knowledge delivery when it comes to customer service, showing that we should never be content with our customer service content:

StateofCustomerServiceKnowledge

Empowering Employees, Engaging Customers with
Parature Knowledge within Microsoft Dynamics CRM

Knowledge and knowledge management serve as the basis for productive, proactive and consistent assisted and self-service customer care. When both employees and customers can find the right answers at the right time, delivered on the channel of their choice or convenience, satisfaction is sure to rise.

Knowledge on every desktop is the foundation for Parature and Microsoft Dynamics CRM’s powerful and growing integration success story. Teamed with Microsoft Dynamics CRM’s case management, this easy access to and delivery of knowledge empowers employees and engages customers for greater service success. Click here to download the feature sheet or contact Sonoma Partners to make this powerful integration work for your brand or organization.

Topics: Microsoft Dynamics CRM

Sonoma Partners Workflow Utilities Revisited!

Today’s post is co-authored by of Ross Talbot, a Principal Developer at Sonoma Partners.

What a difference a few years make. In early 2011, Jim posted this update on the Sonoma Workflow Utilities. He discussed the new solution packaging as well as some of the features of this managed solution. It was a simpler time, when feature parity was just a twinkle in CRM Online’s eye.

Fast forward to today and CRM Online now accepts custom workflow assemblies! This means after a couple of minor modifications to our original solution, our workflow utilities solution will work for both CRM on-premise and CRM Online!

But rather than simply converting our original 2011 solution, we thought we should add another great feature…the ability to include notes into your workflow emails!

Our list of utility features include

  • Format Line Breaks
  • URL Builder (includes returning the record id)
  • Format Record Notes *NEW*

Let’s review these features again.

Format Line Breaks

If you use workflows to send emails, readability can be an issue. No one likes trying to soak in the contents of a wall of text. The problem is the workflow email is sent out as HTML and the text with line breaks doesn’t have HTML formatting with it. We will provide that formatting for better readability within the email.

First, I need to set up the workflow value I want to format. For this case, I created a workflow to email a queue when a contact’s Address 1 changes. I am using the Address 1 Composite field since it will contain line breaks. I added my Workflow Utility reference step and I use the Address 1 field on Contact as the input value.
clip_image002

Now, in the email body I use the formatted value instead of the field directly.
clip_image004

The resulting email now has a bit more consistency and readability. So why would we worry about that? If your data is coming into CRM via an integration or say a 3rd party lead import, for example, how closely are you scrutinizing the format of every field on every record? If you are sending emails to customers via CRM similar to the example above, you will want auto-generated communication to look as polished as your hand-crafted emails.

URL Builder

If you need to include a link to a record in your email, this utility will help you do so in a controlled format. Dynamics CRM has also added the ability to include a record link, however this native Dynamic Record URL uses the URL format information in stored in your CRM org’s configuration. This means that your server and org can be configured for external access and the URL may need to be different inside your network. If this is the case, a customizable format may still be needed. The default URL format remains the same as the 2011 version of the utility:
http://server/org/main.aspx?etn=entity&pagetype=entityrecord&id={0}.

Further, there may be times you want the record id (GUID) for your workflow (usually in cases of integration).

To return the URL, be sure to use the entity schema name for entity, and this URL will need to be updated to match the format and server/org you are using for your link. Per the previous post, there are 3 output values to review:

  • Entity Id - The GUID of the record that instantiated the workflow process
  • Formatted URL - The URL from the input property with the entity id formatted in HTML. Very useful for alert emails, as it will automatically be hyperlinked.
  • Output URL - This is the URL without the HTML formatting. This can be useful if you are using it to populate a field or integrating into another application that may do its own formatting.

Our updated workflow now includes the formatted and out of the box URL links:

clip_image006

Format Notes (new in the Workflow Utilities 2015 & 2013 solutions)

One addition we made to the new version for CRM 2015/2013 compatibility involves Notes on records. When you want to email information about a record, you occasionally will want to include notes attached to that record. Since you are able to enter multiple notes, we added this functionality to append note information to an email. This utility requires no input and takes the current record ID to find related Note records, and the resulting output is formatted as multiple lines of text. Our Fancy Email Workflow now has the updated address with formatted line breaks, notes attached to our contact, and the formatted and out of the box URLs.

clip_image008

Please feel free to download these free solutions at:

Sonoma Partners CRM 2015 Workflow Utilities

Sonoma Partners CRM 2013 Workflow Utilities

Sonoma Partners CRM 2011 Workflow Utilities

Remember you need to be a deployment administrator in order to import the solution, since it contains an assembly.

Always Look on the Bright Side of Your Data

Today’s post is courtesy of Ross Talbot, a Development Principal at Sonoma Partners.

In our continuing coverage of new features included in the CRM Online Spring 2015 Update, today we will be talking about optimistic concurrency.

First, a little review of data quality and minimizing data loss. Just as in life, there are two basic models for minimizing loss when updating data in your database: optimistic concurrency and pessimistic concurrency. Pessimistic concurrency uses row locks to prevent others from making changes while you are performing an update. This prevents a conflict by calling “dibs” and then releasing the lock when you are done. Optimistic concurrency involves an attempt to update and then a rollback if there is a conflict. This prevents a conflict by stopping the second update and letting the user know via an error message. Optimistic data tries first before stopping, and pessimistic data fights others off until its update is complete.

What does this mean for Dynamics CRM today? The lifeblood of your business starts with your customers, so from a CRM system perspective your customer data is vital. With integrations, mobile applications, and multiple users accessing and updating this data, you want to be sure that a situation that could potentially result in data loss is handled in a way that minimizes that potential issue. So let’s dive into an example of how these updates can be used in your code.

Before we start, optimistic concurrency is supported with this update on all out of the box entities enabled for offline sync as well as all custom entities. This is found as a metadata setting “IsOptimisticConcurrencyEnabled” and is set to true if the entity supports it. I have also set up a console app with some basic logging and an organization service to create a contact and test optimistic concurrency via an update and a delete.

Inside the app, I create Bob Brightside and then retrieve the record again so I can obtain the Row Version needed to check during our Update attempt.

clip_image002

From our log file, I see that Bob was created and that the current Row Version is 459773:
INFO "Contact Bob Brightside created with id: 24496e99-470a-e511-80d9-c4346bac7dac"
INFO "Row Version before update attempt: 459773"

Next, I use a breakpoint in my console app to simulate the timing of two updates. One will be made in my console app and the other in the browser. In my code, I will change the First Name field on the contact to Robert. I use the new ConcurrencyBehavior property to check the row version on my update. If the Row Version in CRM matches the Row Version of the contact record I am updating, the update will succeed. If these versions do not match, or if no Row Version is specified, the update will fail. I pause at the breakpoint in order to update the contact via the CRM web interface, changing the First Name field to Mr. replacing Bob.

clip_image004

When I resume my console app, the update request is executed and the update fails.

clip_image005

From our log file, we see that the concurrency check noticed another change had occurred and prevented our update:
ERROR "Concurrency Check Failed: The version of the existing record doesn't match the RowVersion property provided."

Next, I retrieve the record again to ensure I have the latest Row Version. Our log shows this has been updated: INFO "Row Version after update attempt: 459780"
I now execute a Delete Request with the updated contact and the ConcurrencyBehavior property set to IfRowVersionMatches, and since no other updates have been made this request succeeds.

clip_image007

Here is a link to the MSDN article detailing this new feature for more information about the supported entities, fault codes when concurrency checks throw an exception, and additional sample code.

Are you having any issues with your CRM deployment? Concerned that you aren’t doing enough to prevent data loss? Don’t grumble, give a whistle. We can help things turn out for the best.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM Online

Avoid Form Script Errors with CRM Online 2015 Update 1

As many are aware, the Dynamics CRM Online 2015 Update 1 has been live for a bit of time now.  With it come a lot of shiny brand new features for everyone to play with, of which we’ve been blogging about on our site for a bit of time now.

However, with all great new toys, there are usually some pitfalls to be aware of and avoid.  And this release doesn’t fall short of that classification, as there is a potential headache that most customers and partners should be aware of and plan for.

Microsoft posted on their blog some good detail about some performance improvements that were made to form load times.  This is great as I’ve heard from multiple customers (and experienced) the slow loading forms that seem to have popped up when CRM 2013 released with its new UI scheme.

As seen in the image below, the new rendering forms of Dynamics CRM Online 2015 Update 1 drastically improve load times of forms.

SNAGHTMLc046f23

From Microsoft’s blog post, you can see details of what they changed to get this improved performance.  However, with those changes comes the risk of unsupported scripts now failing.  Some examples of where scripts could fail are:

  • DOM manipulations
  • Accessing internal iFrame URLs
  • Accessing unsupported APIs
  • Other windows related assumptions

However, the good news is that there’s a plan in place that you should follow to resolve these issues.

  • First off, make sure that you test your environment thoroughly in a sandbox instance before updating your production instance to identify any potential issues.
  • If you find something that is broken, you can temporarily turn off the new form rendering by going to your System Settings, and setting the “Use legacy form rendering” option to Yes.  Note:  This option to use the legacy settings is most likely going away with the next major release, so please plan on fixing your broken scripts immediately to avoid issues in the near future.

    image
  • You can also download the CRM 2015 Custom Code Validation Tool from this link, and run it on your environment to identify the usage of any deprecated API’s as well as any usage of unsupported API’s.

Moral of the story, be aware, be prepared, and have a plan.  You definitely don’t want to be caught by surprise in production when you’re getting random errors loading forms.  Good luck!

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

Invocable Actions Part 4 – creating a custom action

In part 1 of this series, we talked about what Invocable Actions are, and the problems they are attempting to address. In part 2, we looked at how to discover what actions are available to you, as well as what the inputs and outputs for each are. And in part 3, we looked at how to use the actions in your organization. In this fourth and final part of the series, we will look at how to extend your organization by creating custom actions in Apex.

Creating our custom action

To begin creating our custom action, we need to first understand the @InvocableMethod and @InvocableVariable annotations. Combined, these let us define a method which can (optionally) take in a collection of objects (variables), do some work with them, and (optionally) return a collection of objects (variables).

The @InvocableMethod annotation defines the entry point for our custom action, and there may only be 1 per class file. There are also a bunch of other restrictions placed on this method, such as it having to be static and either public or global. Be sure to read the documentation for a full list of requirements.

The @InvocableVariable annotation is used to decorate the input and output types, denoting what metadata should be published to the outside world.

Both of these annotations have label and description properties, which are published in the metadata to make the method, its inputs, and its outputs more human friendly.

For our example, assume we have the following code which is our custom action:

This class demonstrates a few important notes about custom invocable actions:

  • If they have inputs, they always take in a collection of inputs, encouraging batch processing.
  • If they return values, they always return a collection of values.
  • The inputs and outputs can be complex types, but the members decorated with @InvocableVariable must be either simple types (strings, numbers, booleans, IDs, etc.) or concrete sObject types (Accounts, Contacts, custom object types, etc.)

Once we have saved the code to Salesforce, we can explore the metadata that is published about it in the REST endpoint. Since we created a custom action using apex, our starting point is:

/services/data/vXX.0/actions/custom/apex

0

Here you can see the label that we defined in the @InvocableMethod annotation is being published along with the name of the class. We can use the name property to find out more about our custom action in the same way we did in Part 2 with the Chatter action:

1

Here we can see the full metadata for our action, including the inputs, outputs, and the labels and descriptions for each that we provided in the code. This makes it convenient for us to document our custom actions, since all of the information comes from one place that is regularly maintained. This also follows the same format as the standard actions, so we can use the techniques from Part 3 to craft a request to send to Salesforce, and use our custom action to perform work.

2

Promoting Reuse

While creating custom actions with a standardized input/output format is nice, what really makes Invocable Actions worth investing in is their potential for reuse. In our post on invoking apex from lightning processes we show you how to use custom actions in the lightning process builder, giving non-programmers access to more functionality at a faster pace than before.

Wrap Up

In this 4 part series, we talked about why Invocable Actions were introduced, how to find what actions you have in your organization, how to use them and how to create custom actions of your own. We hope that you have found this series to be interesting and useful. If you have any questions or thoughts, feel free to leave us a comment below or contact us.

Topics: Salesforce.com

Invocable Actions Part 3 – using an action

In part 1 of this series, we talked about what Invocable Actions are, and the problems they are attempting to address. In part 2, we looked at how to discover what actions you have available to you, as well as what the inputs and outputs for each are. In this post, we’ll look at how to use that information to perform a call to Salesforce.

Posting to Chatter

For our example, let’s post a new message to chatter. We can view the expected inputs and outputs by sending a GET request to

/services/data/vXX.0/actions/standard/chatterPost

0
In the returned metadata, we can see that this action wants 3 parameters: Message, Target Name or ID, and Target Type.

For our example, what we want to do is post a new message to chatter saying “It worked!” in the default public group:

1

2

We can accomplish this by filling in the various inputs and sending a POST request to the same url:

3

4

After sending the request, we can see a success response returned with the ID of the feed item that was created, as well as the chatter post in the group feed.

5

This sample shows a few important things:

  • Actions always take a list of arguments, allowing you to perform the same action on multiple sets of arguments at the same time. This reduces the number of calls you need to make to the server.
  • Inputs, like the outputs, follow the JSON format.
  • You input body will always start with an “inputs” property which is an array of the argument JSON objects. The objects inside this array are what change from one action to the next.
  • The response is always a JSON array. The objects inside this array follow the format described in the actions output metadata.

With these conventions in place for all invocable actions, it becomes easier to figure out how to call a web service and accomplish work using the Salesforce platform.

Sending HEAD Requests

Up until now, we have only used GET requests to request the metadata of an action, and POST requests to send data to the server. The Force.com Actions Developer’s Guide also lists HEAD as being an available option. When a HEAD request is sent to an action’s endpoint, Salesforce returns a 200 OK response if the action is available in the current organization, and a 404 otherwise. This can be useful for quickly checking if:

  • A known action has been installed in the target organization
  • The action is available on the given API number
  • The currently logged in user has access to the action

Wrap Up

In this post we learned how to use the metadata we discovered to make a call to Salesforce and accomplish an action. In the 4th and final post of this series, we will write our own custom action using the @InvocableMethod annotation to extend the platform beyond what is possible through configuration.

Topics: Salesforce.com

Introducing Dynamics CRM QuickNav Solution

 

We are excited to announce the release of another free community solution, Dynamics CRM QuickNav 2015. QuickNav provides for easier way for users to navigate the sitemap in Dynamics CRM 2015.

quicknav

The recently launched Microsoft Dynamics CRM Spring 2015 Release provides a much needed usability facelift to the main navigation as shown below.

carina_nav

However, since the Spring 2015 Release is for CRM Online only, on-premise customers will need to wait till the fall before they can use this new feature. Enter QuickNav!

QuickNav is a simple managed solution that reads your deployment’s sitemap settings and displays them in an easy to click list. Some features of QuickNav include:

  • Easily find sitemap items with the Quick Find search, including native settings links
  • Displays and finds all subareas of Settings page – this feature is great for system administrators!
  • Keeps track of your most visited and recently visited links
  • Works with both CRM 2015 on-premise and CRM Online deployments

quicknav_find

For our Dynamics deployment, I set the QuickNav as my home page, allowing me to quickly access the navigation with one click on the home icon. Download QuickNav and try it out on your CRM 2015 deployments today!

Topics: Microsoft Dynamics CRM 2015

CRM Online Spring 2015 – Plug-In Trace Log

With the release of CRM Online Spring 2015 Update, Microsoft provided a long awaited feature for developers that we are really excited about.  That feature is a built-in Plug-In Trace Log that allows developers to utilize the existing ITracingService and provide a way to see any traces without requiring an error to occur to see the trace.

Here’s how it works:

  • First we need to enable the Plug-In Trace Log within the System Settings under the Customization tab.  You can choose to log only Exceptions or both Exceptions and Traces.

image

  • Next, utilize the ITracingService to write out a trace and/or throw an Exception within a plug-in

image

  • Next, register your plug-in on the desired step as normal.  In my example I am registering it on Create of an Account
  • When I attempt to Create an Account record then I receive an error message with the exception that I wrote in the plug-in

image

  • Now Navigate to the new link in Settings –> Plug-In Trace Log

image

  • You should see a grid of all the Plug-In Trace Logs per plug-in execution

image

  • Open up the trace record and you will see the details of any traces and exceptions that occurred with the plug-in.  It also provides the duration of the plug-in execution which will definitely come in handy for performance testing.

image

As you can see, this feature will come in handy and should eliminate the need to use a custom entity to store any log entries.  It also eliminates the need to require users to click the “Download Log” button on the error dialog in order to send the log file when an error occurs.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

Invocable Actions Part 2 – Discovering your web services

In part 1 of this series, we talked about what Invocable Actions are, and the problems they are attempting to address. In this part, we’ll talk about how to go about discovering the Invocable Actions already available in your organization.

Viewing your services

To view your services, you will need a tool that can issue REST calls against your organization as well as API access to do so. The easiest tool to use is the Workbench at Developerforce (https://workbench.developerforce.com). After signing in, navigate to Utilities > REST Explorer.

0

On the following page, the base URL for your organization’s REST endpoint will be prefilled for you. If you execute a GET request against this endpoint, Salesforce will return a series of endpoint that can be used to describe various metadata about your organization. Today, we’re interested in the ‘actions’ endpoint.

1

If you issue a GET request to the actions endpoint, you will see your actions grouped in to two broad categories: standard (actions that come out of the box with Salesforce) and custom (any custom invocable actions you have created in your organization).

2

Note that there may be custom actions listed for your organization even if you haven’t written any code. Salesforce also automatically exposes things like email alerts, flows and quick actions for you so that code can be developed against them if desired.

Viewing your standard actions

We can view the standard actions provided by Salesforce by navigating to the

/services/data/vXX.0/actions/standard

endpoint. When a GET request is sent to this endpoint, Salesforce returns a JSON blob describing the services available, as well as some high level metadata about each.

3

Here you can see a human friendly label, as well as the API name of the action (name field) and they type of action it is (type field). If we wanted to know the details about a particular action (like the Post to Chatter action), we can send a GET request to

/services/data/vXX.0/actions/standard/XXXX

4

In this response, we now get the details for what the inputs are to the action, and what it will return to us. It also gives us detailed information around the types of the arguments, as well as valid values if the arguments are picklists, which are required, maximum length, etc. With this information, clients can enforce valid data is entered before ever sending a request to Salesforce, reducing API and network usage.

Viewing your custom actions

We can view any custom actions in your organization by following the same process, but using the

/services/data/vXX.0/actions/custom

endpoint instead of the standard endpoint. In the case of custom actions, the results are grouped by the type of action as well:

5

You can drill further down to see the various actions under each type, and then follow the format from the standard actions to get the specific details for each one.

Wrap Up

As you can see, discoverability is straight forward and rich using the REST endpoints provided by Salesforce. While this portion of the API is not new with Spring ’15, understanding how to use it and read the results is key when we look at custom Invocable Actions in a following post.

Topics: Salesforce.com

CRM Online Spring 2015 – Folder Level Tracking

Microsoft recently announced the General Availability of the CRM Online Spring Release ‘15 and we wanted to share yet another one of the new features that has been rolled out to CRM Online.  This post will cover the new Folder Level Tracking feature that CRM Online users should start seeing, and CRM On Prem users should hopefully see in the near future.

What is it?

Folder Level Tracking is another way for users to track emails in Dynamics CRM from Exchange.  With Folder Level Tracking, you don’t need to have the CRM Outlook Client installed.  This means that Folder Level Tracking will work with native mobile apps.  For example, if you use a Windows Phone, you can move emails from Exchange to CRM by directly using your Windows phone and we’ll describe how below.

How does it work?  Well there are two main scenarios that Folder Level Tracking supports:

  • Quick Track:
    • This is the scenario where you want emails to quickly be tracked in CRM without setting a regarding.
    • This is equivalent of clicking the “Track” button alone in the current CRM Outlook Client
    • Users can move emails to a specific folder (e.g., “Track in CRM”) and all emails moved to that folder will be tracked in CRM automatically
  • Set Regarding:
    • This scenario is where your emails will be tracked in CRM, and be regarding a specific record in CRM
    • This is equivalent of clicking the “Set Regarding” button in the current CRM Outlook Client

How do you set it up?

Folder Level Tracking has a few requirements for it to work.  First there are system level settings that need to be enabled.

  • First off, Server Side Synchronization needs to be enabled and configured within CRM System Settings
  • Also, Folder Level Tracking needs to be enabled within CRM System Settings
  • The User’s Mailbox in CRM also needs to be setup and enabled

image

Now the users themselves also have to go within their Personal Options –> Emails –> Configure Folder Tracking Rules.  From here they can select the Exchange Folder, and then the CRM Record (optional) they want to track the emails against. 

image image

As you can see from above and as stated earlier, these are user specific configuration rules so each user can have their own synchronization setup.  That’s it!  Pretty simple right?

 

What does this mean for me:

This is a new powerful option to track emails.  The beauty of this is that you don’t need to have a separate client installed, but it’ll work with any native client you’ve been using for emails.  This is available for ALL mail apps on ALL devices.

There are a few tips we recommend when using this option.

  • You can setup Exchange rules to move emails to specific folders (including the generic “Track in CRM”) to have the emails automatically track in CRM based on your Folder Level Tracking configuration rules
  • As stated above, you can move emails using your native mail clients (Windows Phone, iPhone, iPad, etc.) and have the Folder Level Tracking rules apply and create the email in CRM

A few notes that you should be aware of:

  • The mapping between the Exchange Folder and CRM Record are using their respective ID’s, so you can change the name of the Folder or Record, and the tracking will still work.
  • If an email is already tracked, and you remove it from the Exchange folder, it WILL NOT be removed from CRM.  It will remain to be tracked.
  • Removing a rule WILL NOT remove / delete the emails from CRM that were tracked because of it
  • There is SDK support to manage the configuration rules (create, retrieve, modify)
  • You can always specify a regarding for your rule at a later time if you don’t set it up upon create
  • The Folder list in the Rule UI is updated periodically when the mailbox is synced via Server Side Sync and the last sync displayed on the mapping dialog

I hope you’re as excited for this new feature as I am.  I’ve been a part of many mobile projects where the CRM Outlook Client isn’t installed (can’t be installed), yet the client wants to send an email from the device and have it tracked in CRM.  To date there’s been no simple way to use the native mail client, and have those emails tracked, but Folder Level Tracking should solve that problem.  Enjoy!

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online

Introducing: Tree Log

When writing custom code on the Salesforce platform, it’s not unusual to need to read the debug logs to understand why a piece of functionality isn’t working as expected. Unfortunately, the debug logs are flat files, which can make deciphering what chunk of functionality started another chunk challenging - especially as the debug logs grow large. To help tackle this problem, we’re introducing a new tool: Tree Log. This tool can parse the log files and display a tree view of your logs, helping you understand what cause what to run, and the order in which it executed.

Accessing Tree Log

Tree Log is entirely web based, so there is no need for installing extra software or browser plugins. You can access the app by navigating to http://tree-log.herokuapp.com. On the home page, you can either upload a file you have saved from Salesforce, or paste the contents of any log in to the page.

0

Once you submit the form or upload the file, the log is parsed and a tree view is displayed. You can then click on the various parts of the tree to see the logs associated with just that branch.

1

We hope this tool helps you debug your applications more quickly, and makes understanding the dependencies that caused your functionality to run easier. If you have any problems with the application, please leave us a comment below, or tweet at me @nadrees.

Topics: Salesforce.com

How Changing Nothing Can Change Everything: M.Holland & Mobility

"We can do this in a better way."

That's the conclusion that M. Holland came to when they recognized the need for a CRM solution. They pinpointed deficiencies in their business processes and looked to CRM to take them from -1 to 0. But what started as a CRM implementation project evolved into so much more the moment they realized that by changing nothing, they could change everything. They didn't need to invent new processes or technologies. They needed to alter the delivery of the information they already had and make the functions they always had to do more accessible. To get from 0 to 1, and a place where they had a competitive advantage, they needed a mobile application.

Take it to the field

In the early stages of their CRM project, M. Holland team members took our UX architects into the field to collect essential observational data. They went on ride alongs to watch how people actually did their jobs, instead of listening to them explain how they thought they did their jobs. We found that what was supposedly being met on paper wasn't being met within the context of modern mobility. And with that, the conversation headed in a new direction - towards the creation of a mobile app.

No wheel to reinvent

The mobile app discussion was far from revolutionary. Mobilizing your business doesn't require you to make big changes in relation to what you do or how you do it; it requires you to change how the information and processes you have are communicated and accessed. Once in the field, M. Holland recognized that their people were trapped in the paradigm of their every day. Their sales force was frustrated with their existing tools and felt stuck. Getting information from various locations and drives in their laptop was a painful task. What their team needed was a fresh perspective.

IT to the rescue

It took a technology person to uncover that fresh perspective. Through the participation of junior-level UX activities, M. Holland's IT team was able to understand the tactical flow of events that the field team completed in the real world. Understanding the back and forth of activities and data in a dynamic way allowed them to see things differently, and beg the question: what if we did all of the things we're doing but in a mobile-centric way?

Enter Sonoma Partners

M. Holland’s IT team laid the framework that allowed our UX team to create the mobile solution that they were looking for. Take a tour of two of the app screens below:

Account – Canadian + Ship To
Account - Canadian + Ship To
Take a look at the landing page for an account in the phone app. We put the absolute key information, specifically information that a user might need on their phone, on the surface as soon as an account is located. 

Here you can see the account name and number along with the ship-to details. This is useful for the common case of speaking with M. Holland Customer Service on the phone. If a shipment is delayed, a rep will need this info and it’s important that it’s easily accessible.

The Alerts + Tasks section clearly shows any outstanding work items related to this account. The contacts section allows the rep to tap in and see all contacts at this account. Since we know a rep typically deals with one primary point of contact at a given account, we created a special display of that person’s info on the front page. We then give one-tap access to the rep so they can quickly email or call that individual.

Task List
Task List
Breaking the task list into “Needs my attention” and “Awaiting others” is a relatively simple concept from a CRM customization perspective. But in a mobile app, it is a very big deal. This function allows the app to replace excessive amounts of emails back and forth between sales reps and product folks. With one tap they can answer two questions:

-      What do I need to work on?

-      What’s the status of XYZ I fired off?

Finding the answer to both of these questions used to require annoying searches through an overfilled inbox. With the app, problem solved.

The result

A solution that has:

  • Improved customer experience, leading to more opportunities and growth
  • Pushed the technology team to be engaged in the business
  • Increased credibility of the organization in the eyes of their customers
  • Capitalized on the momentum of mobility to better serve their field team

Neil Goodrich, CIO of M. Holland Company will be presenting How Changing Nothing Can Change Everything on Tuesday, May 12, 2015 at 3:30 pm at appsworld North America 2015. Come learn more about how M.Holland achieved their mobility goals and how the IT team played a central role in creating that vision.

 

Get a working custom mobile app for your CRM system

 

Topics: CRM for Manufacturing Enterprise Mobility

Invocable Actions Part 1 – Salesforce web services revisited

When building custom applications on top of the Salesforce platform, it’s not unusual to need web services beyond those that are provided out of the box. The reasons for needing them are many, but generally consist of one (or more) of the following core reasons:

  • Wanting transactional support when creating records of different types
  • Consolidating business logic in one platform
  • Exposing a simpler API to the outside world, obfuscating details about the Salesforce platform
  • Reusing the platform instead of creating yet another piece of infrastructure to maintain

Regardless of the reason to build a custom web service, Salesforce has supported two primary ways of creating them: REST based and SOAP based. Both have their advantages, and depending on which you wanted, you would use either the @RestResource annotation or the WebService keyword. With Spring ’15, a third way to expose apex via web services has been introduced: custom Invocable Actions via the @InvocableMethod annotation.

Yet another way to write web services?

To understand why this annotation was added, we need to first look at the limitations of REST and SOAP in general.

REST is very lightweight, using just the native HTTP protocol and some conventions to transfer data back and forth between client and server. While this makes REST a good choice for many applications, one of its main drawbacks is a lack of programmatic discoverability. Discoverability is key for widely used APIs as it helps the consumers understand what the service is expecting in order to function correctly.

In contrast, SOAP provides strong discoverability in the form of WSDLs, which detail what the arguments are, what the return values are, and the valid data types of everything involved. With this amount of metadata available, tools in some languages (notably .NET and Java) have been developed that will generate the code necessary for a developer to use the web service, reducing the amount of time it takes to write applications against them. However, SOAP is relatively heavyweight both in terms of its complexity and actual data transfers, potentially resulting in slower performance on underpowered devices (like mobile phones) and making debugging it a daunting task.

The ideal scenario is to have something that is as lightweight as possible (a la REST) but still discoverable enough that tools can be built against it to assist developers (a la SOAP). On the Salesforce platform, this is Invocable Actions.

Bridging the gap between SOAP and REST

Invocable Actions attempt to provide the best of both worlds through a combination of metadata provided by the programmer (via annotation arguments) and reflection on the code itself, while utilizing JSON for the underlying data transfers to keep things as lightweight as possible. When asked for the description of the metadata, Salesforce returns the name of the method, its arguments names, and metadata about the arguments (such as argument types, minimum occurrences, maximum occurrences), to the caller, allowing it to potentially generate code and/or UI components to satisfy the requirements.

As an added bonus, apex decorated with the @InvocableMethod annotation is also available to be used in the Lightning Process Builder, promoting reuse of your code even by non-developers.

In the following posts in this series, we’ll look at how to discover the metadata for your organization, how to use these web services, how to write and test your own custom services, and how the metadata that is displayed by Salesforce is determined.

Topics: Salesforce.com