Introducing CRM 2011 Appender for log4net

Posted by Blake Scarlavai on May 6, 2012  |  commentsComments (0)

I am pleased to announce the new CRM 2011 Appender for log4net!  This will allow developers to easily log messages from a custom process to a custom Log entity within your CRM 2011 organization.  The advantage of this over the basic log4net file appender is that Administrators can view these messages from within the CRM UI instead of finding a file that is stored somewhere on the CRM server.

The CRM 2011 Appender is built on the log4net library so it comes with all the features of log4net such as filtering messages to log by level (debug, info, warning, error, fatal) and a variety of tokens to use in the message output.

The project on CodePlex comes with a sample Log entity that can be used to store log messages.  It has a custom message attribute to store the actual message and a custom Level attribute to store the level of the message (debug, info, warning, error, fatal). 

image 

Note:  To limit the amount of records created in a production environment, it is recommended to set the log4net Threshold to only log Warnings and Errors.

For more information about the CRM 2011 Appender and how to use it, check out the documentation on CodePlex - https://crm2011appender.codeplex.com/documentation

Follow the project for future updates and feedback or feature requests are greatly appreciated!

CRM 2011 JavaScript Model Generator

Posted by Blake Scarlavai on April 4, 2012  |  commentsComments (0)

Last month I released the CRM 2011 JavaScript Model Generator on CodePlex and received some great feedback and requests to provide multi-form capabilities and the ability to explicitly include certain attributes, tabs, sections, and left navs.

I am happy to announce that this functionality has been implemented in the latest version of the tool which you can find here - http://crmjsmodelgenerator.codeplex.com/.

Multi-form Capability

This can be accomplished by specifying the name of the form that you want to generate the JS model for (FormName attribute below). If you don’t specify the form name then it will just grab the first form retrieved for that entity.

image

If two separate forms for the same entity are needed then there would need to be two separate javascript files, one per form. The config would look something like this:

image

Explicitly Include Types

This can be accomplished by first setting parameters on the Entity node in the config to false. These parameters include:

  • IncludeAllAttributes
  • IncludeAllTabs
  • IncludeAllSections
  • IncludeAllLeftNavs

Secondly, nodes for each type would need to be added underneath the Entity node. The example below will only generate the model for the “Salutation”, “First Name”, and “Last Name” attributes, the “Address” section, the “General” tab, and the “Addresses” left nav link.

image

To generate all instances for each type, either set the respective “IncludeAll” setting to true or leave it out of the config.

That’s it for this release. Please keep the feedback coming, it has been extremely helpful!

The Curious Case of the Never Ending OData Request and How SQL Profiling Saved the Day

Posted by Matt Weiler on April 2, 2012  |  commentsComments (0)

Today's guest blogger is BJ Dibbern, a Developer at Sonoma Partners.

Just the other day a coworker and I were attempting to track down a request to CRM 2011’s OData service from Silverlight that just would not complete. We first noticed that a very simple update request was taking forever to finish and assumed there must be some sort of error happening that was not bubbling up through the user interface. We went down a long path to troubleshoot this issue, and this is our tale.

We started by first opening up Fiddler to check and see if there was actually an error occurring and it wasn’t bubbling up correctly. We’ve previously covered using Fiddler to help with troubleshooting problems in CRM, and you can reference that here (http://blog.sonomapartners.com/2012/01/fiddling-with-crm.html). However, we sat and watched the request, and it just never completed, just as it looked in the UI.

This was really strange as one would assume that the request would eventually time out; but today this was not the case.

For our next step, we headed over to the CRM Web Server to check its Event Viewer for any sign of error or warning occurring around the time of the request. While there was not anything explicitly listed in the Event Viewer, we did end up finding an event around that time. When we looked at the attached log, we found a detailed error stating: “Generic SQL Error”.

If you ever find yourself faced with a “Generic SQL Error”, it is far better to start with a SQL trace directly on the database as opposed to a CRM trace. Conceptually this makes sense as the error itself is actually occurring in the database.

We ended up heading off for the SQL Profiler in order to run a trace against the database. This can be done following the steps below.

1. Open the SQL Server Profiler. This can be found in the start menu under Microsoft SQL Server 2008 –> Performance Tools.

2. Select File –> New Trace.

3. Connect to the SQL Server in question.

4. On this screen’s General tab you can enter a name for the trace if you desire, and use a template if you have created one previously. Note that these instructions assume that you do not have a template setup already.

image

5. Go to the Events Selection tab.

6. Here you can start to select the events you would like to monitor. Filtering this down and checking individual events one at a time will help you be able to better hone in on your problem, but for now, we’ll select a bunch of events that are relevant.Note that for each event, if you check the box on the far left, the profiler will automatically select all the other columns on the right. Below you will find some suggested events from each category to monitor

a. Errors and Warnings: Exception, User Error Message.

b. Stored Procedures: RPC Completed, SP:StmtCompleted, SP:StmtStarting.

c. Locks: Lock:Deadlock, Lock:Deadlock Chain, Lock:Timeout, Lock:Timeout (timeout > 0).

d. TSQL: SQL:StmtCompleted, SQL:StmtStarting.

image

7. After selecting all your desired events to monitor, select the Column Filters button in the lower right hand corner of the window.

8. In the Column Filters window, select DatabaseName from the list on the left, and under Like enter the name of the desired CRM Organization’s database to be monitored. Performing this step will make sure you are only monitoring the data that is relevant to what you’re trying to troubleshoot.

image

9. Next you can click OK to get out of the Column Filters window.

10. Before you actually click Run to start the trace, you want to make sure you’re setup to reproduce the error message. Once ready, click Run in the SQL Server Profiler, then perform the action in CRM that causes the error. You will be able to Start, Pause, and Stop the trace from the toolbar in the main window of SQL Server Profiler.

We were able to monitor the errors and watch them happen during the trace. From here we were able to correlate what was being logged and determine that there was a process that was still running that held a lock on the table we were trying to access. We found a Lock:Timeout (http://msdn.microsoft.com/en-us/library/ms189107.aspx) event in the trace and this lead us to the fact that, as the event indicates, there was a process currently running that had a lock on the table and was causing our OData queries from Silverlight to fail.

Fair warning here that these methodologies were used on a development environment, and thus data integrity was not a huge concern. These methods should be used with caution and should be thoroughly evaluated by all parties involved before applying to a production environment.

After running a simple query we were able to verify that a query did have a lock on the table and had been running for several hours. Since we knew the table we were looking at did not have any long running processes that should’ve been occurring, we knew we could kill the process. After we killed the process, things thankfully returned to normal. We followed the following steps to retrieve that currently running process and then to kill it.

1. Open SQL Server Management Studio.

2. Connect to the SQL Server in question.

3. Create a new Query.

4. Execute the SQL statement below to display a list of all currently running transactions.

5. If you encounter a long running transaction that you’d like to end, just run a new statement, “KILL [sessionId]”, where [sessionId] is the Numeric identifier of the session you’d like to end.

SELECT TOP 100
   r.[session_id],
   c.[client_net_address],
   s.[host_name],
   c.[connect_time],
   [request_start_time] = s.[last_request_start_time],
   [current_time] = CURRENT_TIMESTAMP,
   r.[percent_complete],
   [estimated_finish_time] = DATEADD
       (
           MILLISECOND,
           r.[estimated_completion_time], 
           CURRENT_TIMESTAMP
       ),
   current_command = SUBSTRING
       (
           t.[text],
           r.[statement_start_offset]/2,
           COALESCE(NULLIF(r.[statement_end_offset], -1)/2, 2147483647)
       ),
   module = COALESCE(QUOTENAME(OBJECT_SCHEMA_NAME(t.[objectid], t.[dbid])) 
       + '.' + QUOTENAME(OBJECT_NAME(t.[objectid], t.[dbid])), '<ad hoc>'),
   [status] = UPPER(s.[status])
 FROM
     sys.dm_exec_connections AS c
 INNER JOIN
     sys.dm_exec_sessions AS s
     ON c.session_id = s.session_id
 LEFT OUTER JOIN
     sys.dm_exec_requests AS r
     ON r.[session_id] = s.[session_id]
 OUTER APPLY
     sys.dm_exec_sql_text(r.[sql_handle]) AS t
 WHERE
 s.status like '%running%'
ORDER BY session_id desc

 

While we weren’t able to uncover why that process had never completed, we were at least able to end the process, and we haven’t had the problem since.

Windows 8 Tablet Apps For Business Could be the Next Big Thing (yes, really)

Posted by Sonoma Partners on March 29, 2012  |  commentsComments (1)

In case you’ve been living under a rock, you already know that Microsoft is putting the finishing touches on their next operating system dubbed Windows 8. Despite the naming convention, it is a major departure from previous iterations. Gone is the famous “Start” button, and in its place is a whole new design that Microsoft calls “Metro.”

While Apple is slowly merging its iOS and OS X operating systems, Windows 8 has been designed from the get-go to provide a truly unified experience between all of your devices, whether it’s a smart phone, tablet, laptop, or desktop. The real kicker here is that this could be the first generation of tablet computers to truly replace a desktop or laptop. 

2 weeks ago ZDNet announced that we had completed the first enterprise-level app for Windows 8 tablets, and the interest we’ve received since then has been amazing. People that have seen the app in real life are blown away by how elegant and simple an enterprise productivity application can be.

Newbelgiuminterface2

With apps that are as easy to use as they are easy to look at, a major shift could be underway for people who find themselves working in the field. Since these Windows 8 devices can run every productivity app they’re used to (yes, including Office), they may no longer need multiple devices. Simply take your tablet with you on the road, and when you return home put it in a dock with external monitor and keyboard and it becomes your desktop. 

What About Developers?
Apps are great to talk about, but without a robust developer community a platform is doomed to fail. Luckily for Microsoft, they have the largest developer community in the world. And they plan to entice that community very heavily with incentives.

Once an app in the Microsoft Windows 8 store hits $25,000 in sales, Microsoft reduces its cut of the sale from 30% down to 20%. Compared to Apple’s App Store that is a tremendous pricing advantage for developers. In addition, developers can use their own commerce engine inside the application and keep 100% of the revenue – a far cry from Apple’s approach. 

When Does This All Start?
No official release date has been made public yet, but rumors are swirling that the release candidate could be ready as early as May of this year. It's a pretty safe bet that we'll all see Windows 8 tablets in fall of this year, both Intel and ARM chipsets included. 

Is Something Missing in Your Organization Service? Check the Cache!

Posted by Blake Scarlavai on March 5, 2012  |  commentsComments (0)

The Developer Extensions for Microsoft Dynamics CRM are extremely helpful tools for developing custom code for CRM. They provide a simplified way to connect to the CRM Services with the ability to be configured and extended.

One ‘gotcha’ when using the CrmConfigurationManager class to connect to CRM is that the default configuration includes caching of the organization service. A colleague of mine was running into an issue where the organization service wasn’t recognizing his newly created relationship when developing a query, so he had the need to disable caching.

To do this, update the App.config with the following XML:

  2-22-2012 3-42-02 PM

Note that this requires the microsoft.xrm.client section to be declared in the App.config as well. The full App.config should look something like this:

  2-22-2012 3-44-52 PM
 

The examples above are covered in the following MSDN article
http://msdn.microsoft.com/en-us/library/gg695805.aspx

Ad-hoc Comments on CRM Reports

Posted by Sonoma Partners on February 27, 2012  |  commentsComments (1)

Today's guest blogger is Jacob Cynamon-Murphy, a Technical Specialist at Sonoma Partners.

It's no secret - I have opinions and I like to share them, so during a demo, it came as no surprise when a prospect asked about how they might share opinions of their own.  Exploring a migration from a proprietary CRM system, they wanted to understand how CRM 2011 supported adding ad-hoc comments to SQL Server Reporting Services (SSRS) reports.  I've heard this request a few times while talking with customers, so I wanted to share a variety of approaches that yield similar results, but address somewhat different needs.

Parameterized comments in the SSRS report
If you know in advance that you would like to have ad-hoc comments on a report, it is easy to create a custom parameter in the report definition to support this.  When the user selects filters, they could also submit a block of text as a comment that would then show up in a "summary" or "comments" section of the report.  Although this technique would make it easy for a user to add comments to a report at the time of generation, it does require a SSRS admin to customize the report and limits the user's comments to a pre-defined area.  This approach is best-suited for scenarios where you may have a need for a summary or header area that is drafted from scratch for each report generated.

Jc1

Emailed comments with an attached report
With this technique, no custom report definition is necessary; simply render the report in your preferred format, write up your comments in an email and attach the document.  I am assuming that every user in your organization who is creating or reviewing reports would have access to email.  This approach requires no customization, but doesn't bind the comments with the report; if a recipient replies to the email, the attachment will not stay attached for reference.  For one-off exchanges, this technique should be fine; for more in-depth reviews, look to the next approach to get what you need.

Jc2

PDF report with embedded comments
Easily my favorite of the approaches, I call this the Romeo and Juliet approach - marrying Adobe Reader and CRM 2011 to create fully-commented, distributable reports.  I discovered this feature by accident while reading a whitepaper.  This feature may have been available in versions prior to version "X" of Adobe Reader, but I only noticed it after Adobe updated my software to the latest version.

When you open a PDF in Adobe Reader X, there is a button on the menu called Comment.  When you click on Comment, a sidebar expands on the right side of the window, allowing you to add two types of Annotation - Sticky Note and Highlight Text.  They're self-explanatory, so I won't go into too much detail - the takeaway here is that you can use this feature of Adobe Reader to apply comments to your read-only PDF report, sharing your opinions and thoughts with colleagues.  There is even a concept of replies and checkboxes, so you can have multiple participants commenting and reviewing together.  While this is likely most useful for editable PDFs, it allows us to address a common requirement of comments on reports, while preserving the read-only nature of the report itself.  The comments travel with the report and remain for all readers to 

Jc3

Quick Steps

1. After generating the report, click on Export and select Acrobat (PDF) file.

Jc4

2. If you are prompted to Open or Save, select Open.

Jc5

3. Inside Adobe Reader, apply your comments.

Jc6

4. Select File | Attach to Email… to kick off a new email.

Jc7

5. Click Attach to open your email client and send your annotated report.

Jc8

Conclusion
As we have seen, there are several options for including ad-hoc comments on CRM reports.  The three I outline give you some great options that you can use to include your own thoughts on the reports that you share, but that's just my opinion ;-)  Happy reporting!

 

Author’s Note: Special thanks go to Brendan Landers and Corey O’Brien for reviewing this content and for Neal Sullivan for authoring the ad-hoc report with parameterized comment.

 

Whoa Doggie, it’s on with Microsoft CRM’s Next Update!

Posted by Mike Snyder on February 6, 2012  |  commentsComments (1)

Hot off the presses this morning, Microsoft announced the details about the next service update (release) of Microsoft Dynamics CRM 2011. I have reviewed the details, and I am here to say this is BIG TIME! The next update doesn’t have an official name yet so let’s just call it the H2 2012 update for now. You can get more details in the updated Statement of Direction.

image

Microsoft Dynamics CRM Mobile
Hallelujah! Microsoft will finally offer a proper mobile solution. Sure you have always had Microsoft Dynamics CRM Mobile Express, but that didn’t quite work for all customers. Fortunately, now you have the option to upgrade.

  • Supports all major mobile platforms - iPhone, iPad, Blackberry, Android and Windows Phone 7. Yes you read that right, support for non-Microsoft devices!
  • Works with both on-premise and Microsoft Dynamics CRM Online deployments
  • License allows a user to connect up to three devices (so I can have an iPad and a Windows Phone 7 connected)
  • Works offline
  • Cloud subscription – list price of $30/per user per month

Multi-Browser Support for Microsoft Dynamics CRM
If the news that Microsoft was going support non-MSFT mobile devices wasn’t enough to knock your socks off, you had better sit down. Microsoft Dynamics CRM 2011 will support non-Internet Explorer Web browsers! Here are the details:

  • Firefox (Version 6+) on Windows 7 / Windows Vista / Windows XP / Mac OS-X and iOS 5.x
  • Chrome (Version 13.x) on Windows 7 / Windows Vista / Windows XP
  • Safari (Version 5.1.1+) on Windows 7 / Windows Vista / Windows XP / iPad 2 (iOS 5.x)
  • Internet Explorer (Version 7.x+) on Windows 7 / Windows Vista / Windows XP

The only minor wrinkle to the multi-browser support is that the administration pages (assuming that means system configuration, etc.) will still require Internet Explorer but that’s no big deal.

Activity Feed Enhancements
Microsoft is continuing to invest in the enterprise social networking space by adding new features to the Activity Feeds module they first released in November 2011. These enhancements include:

  • Like and Dislike (Dislike? Really? Even Facebook doesn’t have that :))
  • Filter to just show your @ mentions
  • Filter based on the types of records you follow
  • Filter on record views
  • Updated mobile app for Windows Phone 7.5

SQL Server 2012
This one is pretty obvious and you might be tempted to think this is just an infrastructure benefit. However, SQL Server 2012 actually offers the potential for cool new reporting options through the new Power View tools. If you have not seen Power View in SQL Server 2012 yet, check it out right away…it’s impressive! The H2 2012 update will include some pre-built PowerPivot models and PowerView reports to help you get started.

Read Optimized User Interface 
This is a neat new option that allows users to open CRM records in a light-weight read-only form. By doing so, users will see significant improvements in form loading times because there’s less data to download. If the user then wants to edit a record, they just click the “Edit” button to access all of the fields. Even better, each user can specify their personal preference on whether they want the form to open in Read-Only or Edit mode by default.

Custom Workflow Assemblies in CRM Online
Currently, Microsoft Dynamics CRM Online does not support custom workflow assemblies. HOWEVER, that gap will be fixed soon because the H2 2012 release will support custom workflow assemblies in an Online deployment.

Additional Microsoft Dynamics CRM Online Certifications
The Microsoft Dynamics CRM Online datacenter has been going through auditing and certification for many of the industry standard certifications that customers request. The H2 2012 update will be compliant with these certs:

  • Safe Harbor
  • ISO 27001, SAS70 Type II, SOX
  • Data Processing Agreement (DPA)
  • EU Model Clauses
  • HIPPAA / BAA
  • SSAE SOC1 Type II

Industry Templates
Last but not least, Microsoft will offer some industry specific templates to help ramp up customers and partners. We would suggest that you use these for evaluation purposes only, they aren’t ready for customers to drop in and get started using immediately in our opinion. The industry templates include: non-profit, wealth management, health plan sales, and relationship management for health.

Overall, it’s great to see the continued investment into Microsoft Dynamics CRM. I am also proud of the Microsoft CRM product team by sticking to continual updates every 6 months (versus the old model of updates once every 3 years).

Fiddling with CRM

Posted by Sonoma Partners on January 17, 2012  |  commentsComments (2)

Today’s guest blogger is Blake Scarlavai, a Senior CRM Developer at Sonoma Partners.

Fiddler can be extremely helpful in troubleshooting CRM issues and also great for testing web requests before deploying.  In this post I will go over some of the helpful and maybe not-so-obvious features of Fiddler. 

First things first, you can find Fiddler here - http://fiddler2.com/fiddler2/version.asp.  Also to get started we first need to turn on a few settings. 

If you are using HTTPS then go into Tools – Fiddler Options -> HTTPS Tab and check the following options:

  • Capture HTTPS CONNECTs
  • Decrypt HTTPS traffic
  • Ignore server certificate errors

clip_image002

Next, click on the Composer tab on the right side panel of Fiddler.  Then click on the Options sub-tab and select Automatically Authenticate

clip_image004

With these settings turned on, we can now perform the following techniques.

Request Logging

The main feature of Fiddler is being able to log and inspect web requests being made from the client machine.  In CRM this is very helpful for debugging any requests that are failing and it also can be used to see how much traffic there is and how long each request takes.  If you have ever seen a “Not Found” error coming from a Silverlight web request then usually Fiddler can be used to spot the failing request and uncover a more helpful detailed error.

To get started logging traffic.  Make sure the bottom left corner of Fiddler says “Capturing” and if not click the empty box to enable logging.

clip_image006

Once logging is enabled, browse to CRM and navigate to the area that makes the failing web request.  You should see a request on the left pane in red which indicates that there was an issue.

clip_image008

If we click on the red web request we can then use the Inspectors tab on the right side pane to inspect the web request.  The top pane will show information about the request and the bottom pane will show information about the response.  For my specific example, I can use the bottom pane to see the response and notice that there is a more detailed error being returned.  Fiddler is telling me that “‘SystemUser’ entity does not contain attribute with Name ‘new_test’.”.  I know that this attribute doesn’t exist in my Organization and I can check the top pane to view the request and see that a query for SystemUser is being made and trying to return the non-existent ‘new_test’ attribute.

For performance tuning on a CRM form, we can clear out all the existing web requests using Ctrl-X and then stop capturing until we are ready to pull up the form.  Once we are ready to pull up the form, click the box at the bottom left to start capturing traffic again.  Now open the CRM form and when it is finished loading, click the box again to stop traffic.  Now highlight all the web requests in the left pane and in the right pane, click the Statistics tab at the top.  This will display some helpful information such as how many requests were made, the bytes sent and received, and the amount of time the requests took.  In my example below, there were very few requests made and it took about 1.5 seconds to complete.   

clip_image010

We can see a chronological view by highlighting all of the web requests again and selecting the Timeline tab on the right.  This will show a breakdown of how long each request took.

clip_image012

Composer

A very helpful feature in Fiddler is the Composer feature.  If we go back to the very first example where a query for SystemUser is being made with a non-existent column, we can use the Composer tab to fix the very same web request.  To fix this we can go to CRM where the failing web request happens.  Capture that web request using fiddler and now click on the Composer tab on the top right pane.  Then drag the web request from the left pane over to the right pane.  This will auto-populate values in the Composer tab and allow us to edit the Request Body at the bottom of the right pane.

clip_image014

In my example I can remove the problem attribute in the Request Body highlighted above.  Then I can recreate the web request without the problem attribute by clicking Execute at the top right.  This will perform the new web request and log it in fiddler as well.  As shown below using the Inspectors tab, my new web request was executed without the problem attribute and data was successfully returned in the Response pane at the bottom.

clip_image016

AutoResponder

We can take the above example with the Composer feature even further.  First grab the TextView of the Response body above (the working web request) and copy and paste it into notepad.  Save that file as XML.  Now highlight the problem web request in the left pane and click the AutoResponder tab at the top of the right pane.  In the AutoResponder pane first check Enable automatic responses and Unmatched requests passthrough.  Now click Add at the top right to create a new rule.  At the very bottom, use the second drop down to select the XML file that was saved in the first step.  Then click Save.  What this does is create a rule that says “If a request URI matches this specific URI, then respond with the selected XML”.  In our scenario this will look for any requests that match the URI of our problem request and return the XML of our working web request.       

clip_image018

With this AutoResponder rule setup we can now test our fix for the problem web request by navigating to it again in CRM and it should work as if there isn’t a bug in our query and respond with the correct data. 

By using the above techniques we can troubleshoot our web request issues to uncover a helpful error, test our fix to the problem web request and see it in action without deploying any code updates.  Now that we have our fix, we can make our code changes and deploy it for testing.

What’s New in the Microsoft Dynamics CRM November 2011 Service Update

Posted by Mike Snyder on January 5, 2012  |  commentsComments (0)

With the Thanksgiving and Christmas holidays causing a major distraction, Microsoft quietly released an impressive new update for Microsoft Dynamics CRM 2011. In typical wordy Microsoft marketing fashion, this released is named “Microsoft Dynamics CRM November 2011 Service Update”, although you might also see this release referred to as (these are all the same thing believe it or not):

  • Microsoft Dynamics CRM Q4 2011 Service Update
  • Microsoft Dynamics CRM 2011 Update Rollup 5 (how you actually download and install the update)
  • Microsoft Dynamics CRM 2011 R7 (Microsoft’s internal code name for this release)

You can check out the official Microsoft marketing content if you want to get your information right from the source:

We wanted to share our perspective on this release and call out the highlights. So without further ado, here we go! These are listed in rough order of importance from high to low.

Social Capabilities via Activity Feeds

Microsoft Dynamics CRM 2011 now offers social networking capabilities directly within the platform via Activity Feeds. Activity feeds offer enterprise microblogging so that users can internally share and collaborate on CRM records. The activity feeds posts can be user generated or auto-generated based on rules that you configure. We created a short screencast to give you an overview of how activity feeds work within Microsoft Dynamics CRM:

The fine print: Microsoft does not automatically add Activity Feeds to your existing CRM Online deployment, you need to manually install Activity Feeds and setup them up. You can download the Activity Feeds solution from the Dynamics Marketplace.

Enterprise Cloud Capabilities

While Microsoft Dynamics CRM Online is a great offering, in the past it lacked some of the capabilities that many large organizations demand. With the November 2011 Service Update, Microsoft Dynamics CRM Online is truly ready for the enterprise:

  • Microsoft CRM Online supports Active Directory federation so that users can logon with their regular AD accounts (instead of having to create a separate Windows Live ID account like CRM Online users need to do today). This is often referred to as single sign-on (SSO).
  • Microsoft announced they designed the AD federation feature so that they can support additional identity platforms in the future, although they didn’t specify which platforms they are thinking (guessing Facebook? Google?).
  • Microsoft added in-region disaster recovery with additional data centers in Europe and Asia. In the past, all of CRM Online was run out of data centers in the United States.
  • Microsoft added a bunch of industry certifications which many customers require of their data center.

The fine print: First, only customers running Microsoft Dynamics CRM Online on the OSDP (Online Services Deployment Platform) can setup AD federation. If you have an existing CRM Online org, you will need to get your organization migrated to OSDP. You cannot just “turn on” AD federation for your CRM Online deployment. Microsoft has not released the details and timing on this migration process for existing customers. If you are considering purchasing Microsoft Dynamics CRM Online and you need AD federation, you can request a CRM Online trial on the OSDP platform but you must have at least 100 users.

In order to setup single sign-on, you need to configure Active Directory Federation Services 2.0 and meet the system requirements.

Announced Additional Browser Support for Microsoft Dynamics CRM

This one is a little tricky because it’s just an announcement of FUTURE functionality but we think it’s hugely important. Microsoft announced that the next service update (codenamed R8) will support multiple web-browsers and platforms. This includes:

  • Safari web browser (PC and Mac / iPad)
  • Firefox web browser (PC and Mac)
  • Chrome (PC only)

We are particularly excited about this because supporting Safari on a Mac also means that users will be able to access Microsoft Dynamics CRM through their iPad or iPhone. Nice! Microsoft communicated that the R8 release will be in the first half of calendar year 2012.

Feature Enhancements

The November 2011 Service Update also includes a handful of nice little feature updates. These improvements include:

  • Outlook reading pane improvements
    • You can now click on links in the reading pane (email, telephone, lookups, etc.)
    • Subgrids can be displayed
    • The reading pane will show Lync presence
  • Outlook email tracking switched to asynchronous, this will provide better performance over slower connections
  • Dialog improvements
    • Data is saved when moving back and forth within dialog windows
    • Added support for Date, Date Time and Lookup type data attributes
  • Added Insert Hyperlink capability so that you can include the Record URL in workflows and dialogs
  • Added User Audit capabilities so that companies can track when users logon to Microsoft Dynamics CRM (either via a Web browser or Outlook client)
  • Improvements to charting and reporting capabilities:
    • Added area and stacked chart types
    • Can include multiple series per chart (up to 5 series)
  • Duplicate detection enhancements
    • You can now ignore blank values when configuring your rules
    • You can also exclude inactive matching records when looking for duplicates

Unified Office 365 Experience

The November 2011 Service Update makes life a little easier for customers that are also using Office 365 because now they can have unified provisioning, billing and administration between the two systems.

The fine print: This has same restrictions as the ones mentioned above for Active Directory federation, it only applies to new customers running CRM Online on the OSDP platform.

What’s Next?

Obviously this update includes lots of great new stuff, but if you’re like us you’re already wondering what’s next after this?!?! You should expect to see the next release codenamed R8 in the first half of 2012, but Microsoft hasn’t announced the details of that release just yet. We are also expecting Microsoft to release an updated Statement of Direction document very soon, so stay tuned for details on that.

Light “spackling” for your Activity Feed walls

Posted by Sonoma Partners on December 30, 2011  |  commentsComments (2)

Today's guest blogger is Jacob Cynamon-Murphy, a Technical Specialist at Sonoma Partners.

I'm a big fan of Activity Feeds, the social CRM feature in Microsoft Dynamics CRM introduced with release 7 (R7) in November.  Not only can users manually post to "record walls," but power users can use Activity Feed Rules or custom workflows to create auto-posts when meaningful events occur on records or in the system.  Internally, we have updated the Sonoma Vibe desktop and iPad clients to use the new Activity Feed Post and Comment entities as well, making it very easy to share news and knowledge (not to mention fun) with the rest of the company.

Image008

As a technical specialist at Sonoma Partners, I am responsible for managing the demo environments that we use.  Benefitting from a little slow time while everyone is on holiday, I decided the time was right to deploy the managed solution for Activity Feeds to all of our demo orgs that my colleague in IT had updated to R7.  While deploying the solution and enabling activity feeds for the primary entities, I quickly noticed that the bit field to enable record walls sometimes remained at 'No' despite everything I attempted to set it to 'Yes'.

Image009

I wondered if this might be a common issue, so I checked the Microsoft Dynamics CRM forum and the CRM Team blog.  On the blog, I discovered an article about enabling record walls manually; in short, the plugin that processes Activity Feed Configuration records is designed to only add a record wall to an entity's form if there is only a single form of type "Main".  The article goes on to walk through the manual steps to add the tab and HTML web resource to each form, attach the JavaScript web resource to the forum, and register an event handler from the JavaScript to the tab; that last step cleans up the form by hiding the record wall until a user accesses it from the form navigation on the left-hand side.

Image005

While this approach works fine if you have one or two forms to modify, I had dozens; several of our demo environments have managed solutions or manual customizations that use role-based forms.  I decided to write a quick-and-dirty utility that prompts the user for a server name and an organization name (and saves up to 9 server/org pairs), credentials and an entity logical name and automates these form customization steps for each "Main" form of the entity.

Image010

If you have a complex implementation including entities with multiple forms, this utility - available for download - will save you time configuring and get your organization more social, and patch up record walls so your users can share information more effectively.

 

Security Settings for Displaying a Native Ribbon Button

Posted by Sonoma Partners on November 7, 2011  |  commentsComments (1)

Today’s guest blogger is Blake Scarlavai, a Senior CRM Developer at Sonoma Partners.

Having trouble figuring out why a native ribbon button isn’t displaying?  An easy way to determine the permissions required for the ribbon button is to export the entity or application ribbon. 

For example, we were trying to set up a security role and allow the permission to import data.  The ‘Import Data’ ribbon button is usually displayed in the application ribbon but it wasn’t displaying for a user with our new security role. 

clip_image002

To debug this, I took to the application ribbon xml.  I used this handy sample code to easily export the application ribbon from my organization - http://msdn.microsoft.com/en-us/library/hh547439.aspx.  Another option would be to add the application ribbon to a standalone solution and export that solution to retrieve the ribbon xml.

Once the application ribbon xml is retrieved, I was able to search for the word ‘import’ to find the following button definition:

<Button Id="Mscrm.BasicHomeTab.Tools.ImportData" Command="Mscrm.ImportData" Sequence="10" Alt="$Resources:Ribbon.Jewel.ImportData" LabelText="$Resources:Ribbon.Jewel.ImportData" Image16by16="/_imgs/ribbon/ImportData_16.png" Image32by32="/_imgs/ribbon/importdata32.png" TemplateAlias="o1" ToolTipTitle="$Resources:Mscrm_BasicHomeTab_Tools_ImportData_ToolTipTitle" ToolTipDescription="$Resources:Mscrm_BasicHomeTab_Tools_ImportData_ToolTipDescription" />

From the button definition, I was able to find the Command Id ‘Mscrm.ImportData’ (highlighted above).  I then searched the ribbon xml for ‘Mscrm.ImportData’ to find the following Command Definition so that I could identify the DisplayRule.

<CommandDefinition Id="Mscrm.ImportData">
  <EnableRules />
  <DisplayRules>
    <DisplayRule Id="Mscrm.NotOffline" />
    <DisplayRule Id="Mscrm.ImportData" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction FunctionName="Mscrm.ImportData_0" Library="$Webresource:Ribbon_main_system_library.js" />
  </Actions>
</CommandDefinition>

As highlighted above, the DisplayRule has the same name as the CommandDefinition so I continued to search the ribbon xml for ‘Mscrm.ImportData’ to find the following DisplayRule definition:

<DisplayRule Id="Mscrm.ImportData">
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Create" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Delete" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Read" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Write" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="Create" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="Read" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="AppendTo" PrivilegeDepth="Basic" />
</DisplayRule>

As you can see, the DisplayRule definition above explicitly lays out the not-necessarily-obvious permissions needed for the ‘Import Data’ button to display.  We compared this with our security role permissions to discover that we were missing Delete rights on the import entity (Data Import).  Once this privilege was added, our ‘Import Data’ button magically appeared.

clip_image002[4]

Convergence 2012 – Registration Opens in November

Posted by Ryan Toenies on October 31, 2011  |  commentsComments (1)

Registration for Convergence 2012 is just around the corner (#CONV12).  Registration opens on November 16 and the early registration period ends on January 25.  Early registration will save you $300 on the conference fee.

Convergence Registration

Convergence 2012 is being held in Houston, TX, from March 18 – 21.  A little birdie has informed me that you will NOT want to miss the opening Convergence Reception on Sunday night, March 18.  Plan your travel schedule accordingly. 

Highlights of the 2012 Convergence Conference

  • New Experience Center
  • Keynote Speaker on Wednesday, March 21 (TBA)
  • User Group Sessions
  • Birds of a Feather
  • Interactive Discussions

We look forward to seeing you at Convergence 2012 in Houston!

Document Assembly & Management, the One Stop Shop!

Posted by Sonoma Partners on October 26, 2011  |  commentsComments (2)

Today’s guest blogger is Josh Meyer, an account executive at Sonoma Partners.

In today’s vast world of software products, it’s nearly impossible to find a single platform that can provide all of the business functionality that end users need to accomplish their daily activities. How often do we all need to log onto several different systems throughout the course of the day to get our work done? Typically, these tools never look or function in the same manor, creating a painful end user experience. Rarely do any of these tools communicate with one another leaving information in silos … if only the dots could be connected.

Connecting the Dots

Microsoft Dynamics CRM 2011 takes the first step in connecting commonly used tools together for end users. How many of us use Outlook, Word, and Excel on a daily basis? Is it fair to say that nearly all of us use these tools at a very high frequency? Microsoft Dynamics CRM 2011 was built to deliver a platform that can be configured to meet your unique business needs while integrating with other commonly used Microsoft products (Office, SharePoint, Lync, and etc). This seamless integration enables users to utilize familiar applications to accomplish their daily activities.

While this seamless integration is important, it doesn’t in itself solve the issue of connecting with your unique business process. Ultimately, these system needs to be altered to meet your needs. Sonoma Partners helps clients take this important next step to not only configure Microsoft Dynamics CRM 2011 to meet your business needs, but also to extend that configuration to the entire business process experience.

Document Assembly & Management Revealed

On a regular basis we are all creating and managing documents, if only they could be connected in some way to the business information and business processes that uses that information. Sonoma Partners has built CRM add-ins for Microsoft Word & Excel that enable users to use these tools in their native setting but allowing them to push and or pull information into Microsoft Dynamics CRM and Microsoft Office SharePoint. For users, this is critical because it allows them to continue to use the tools that maximize their efficiency, while ensuring that the work they perform is connected to all the key business processes. Preserving a native application experience helps to promote a collaborative experience throughout the organization.

Microsoft Word Generation

In this example, we take a simple status report that we have all either written or received at one point in time. Typically, a status report is written in a Microsoft Word document and distributed to a client. Then, hopefully, the author remembers to save the document in a central file location for broader reference and would finally update their project management system to track key metrics from the status report. By this point the author has likely spent more time saving the status report & updating the project management system than it took to create the initial status report. That is not business productivity!

The Sonoma Partners Word add-in is a CRM accelerator that resides in Microsoft Word that allows the author to easily open Word templates that connect data to and from your CRM database. In the above example, the author would enter the necessary information into the status report, and then click a button to push the data back to CRM. The Add-in also allows you to save the document to SharePoint and then email the update to all appropriate members.

Sonoma Partners first blogged about two way integration between Microsoft Word and Microsoft Dynamics CRM last September!

This integration scenario demonstrates a user utilizing a familiar tool, Microsoft Word, while performing multiple business tasks from a single user interface. This creates a simplified user experience while adhering to standardized business processes.

image

Microsoft Excel Management

Microsoft Excel is the world’s most popular software application to perform data analytics and data manipulation. Often, the challenge is that the Excel data and results aren’t pushed back to any system where it can provide wider organizational value. In this example, we take a project plan that was built and maintained through Excel and show you how to expand the reach through Microsoft Dynamics CRM. The challenge we have found, as it relates to project plans, regardless of the tool, is that the data in the project plan is not actionable through any of the business systems, ultimately limiting its effectiveness.

The Sonoma Partners Excel add-in allows the author to maintain their project plan in their tool of choice, update relevant details (dates, statuses and etc.), then synchronize that content to Microsoft Dynamics CRM where actionable business workflow can be applied. This add-in allows for bi-directional synchronization between Excel and CRM, negating the need for the project plan to always be maintained in Excel because it is stored in CRM. The author simply needs to open Excel, load the data, make the appropriate updates and synchronize with CRM.

clip_image004

Both the Microsoft Word & Excel add-ins highlight examples of enabling users to be more effective while utilizing familiar experiences to gain maximum business productivity. This powerful combination results in increased collaboration, higher end user adoption and adherence to important business processes that will help support a stronger bottom line!

Trying to catch my form ridin' dirty?

Posted by Brendan Landers on October 14, 2011  |  commentsComments (6)

I recently had a customer that was unable to use the native print functionality for a particular entity.  Anytime they tried to print (File --> Print Preview) from within the form, they received the following warning "This form has been changed and must be saved before printing":

 Error

This happened even though the user had just opened the form (without making any changes).  Even if they saved the form and tried again, they received the exact same warning.  The form was perpetually "dirty" thus preventing the ability to print (along with forcing saves on close even when no change was made).  We disabled all the javascript we had on the form, and the problem persisted.  

I had a colleague whip up some JS that would show me what fields were considered dirty:

javascript:var message="The following fields are dirty: \n";window.frames[0].Xrm.Page.data.entity.attributes.forEach(function(attribute,index){if(attribute.getIsDirty()==true){message+="\u2219 "+attribute.getName()+"\n";}});alert(message);

I just loaded the form, pasted the above in the address bar and voila - I could see which fields CRM was angry about.  (Depending on your browser security settings, you might need to manually type the "javascript:" into the address bar). It turned out CRM didn't like one of my lookup fields on the form.  It wasn't immediately obvious why CRM was unhappy, but after further head-scratching and leaning on the experience of my fellow Sonomans we finally figured it out.

JSPrompt

The value of the primary attribute of the lookup (generally the name field) contained two consecutive spaces (due to a concatenation issue pre-import).  Any time you have a record with 2 or more characters of white space in the name field, and that record is selected in a lookup, Microsoft CRM will think that lookup is dirty.  The reason is because CRM tries to be clever around removing extra white space between words.  What ends up happening is when it’s checking to see if a lookup is dirty, it checks to see if both the default value and the current value have the same id, typecode, and name.  But when it checks the name part, the default value has the correct spacing, and the current value has the trimmed spacing, and so they don’t match and CRM thinks the lookup is dirty.  

Here is an example:

Example

You can see that the first name contains many spaces, but above the header where the primary attribute field displays, the extra spaces are removed.  The same thing happens on a lookup:

 Lookup

The fix was quite simple - update the fields to replace consecutive spaces with a single space.  While we like that Microsoft included logic to clean up the value, we have submitted a case indicating that the form being dirty in these instances is, in our opinion, a bug. We did some testing in the Microsoft CRM Online environment and it looks like this might already be corrected but some of you on-premise customers might still see this issue.

Many thanks to Bob Lauer, Corey O'Brien, and Rob Montague for helping me get to the bottom of this one!

Dynamics CRM 2011 Web Resource Content Size Is Too Big Error

Posted by Sonoma Partners on October 9, 2011  |  commentsComments (0)

Today’s guest blogger is Mike Dearing, a CRM Developer at Sonoma Partners.

A colleague of mine started receiving an import error for web resources a few days ago on a client environments, “Web Resource content size is too big”.  His scenario was tricky because none of us had ever run into this error before and was working previously. Scouring the forums led us nowhere, but a quick search on MSDN saved the day!

Size Limitations

The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property. This property is set in the E-mail tab of the System Settings in the application. This setting limits the size of files that can be attached to e-mail messages, notes, and and unfortunately web resources. The default setting is 5MB.

image

As luck would have it, our client wanted to disallow attachments on notes, so they had correctly updated this property to 0.  Unfortunately, since we now know that this property is shared between 3 different areas of functionality, we had to reset it and were able to properly import/update web resources again. Of course, we need to go back and change the setting after each solution update in order to respect the business requirement. 

We created a Connect suggestion to alter this behavior. If you agree, vote it up!  Hopefully this helps others who may run into this issue in the future.

Some Assembly Required – Unmanaged Solution Gotchas

Posted by Kristie Reid on September 20, 2011  |  commentsComments (4)

In Microsoft Dynamics CRM 2011, you can use solutions to bundle and export customizations from one environment into a different Microsoft CRM system (perfect for moving from development to QA to production). You might assume that exporting the solutions from one system to another would provide a perfect duplicate of the original environment. However this is not always the case! We have found a few gotchas regarding importing solutions that I wanted to share. Specifically:

  • Audit Settings
  • View Status
  • Default Views and Dashboards

Let’s explore each of these in more detail.

Audit Settings

During the export process of a solution, you can now select which system settings you want to migrate between the two environments.

 01 - Export System Settings

This flexibility to pick and choose is excellent. However, if you carefully compare the full list of System Settings to which settings you can export, you will notice that some of the options (such as Auditing) are missing: 

02 - System Settings 

What we found is that the Enable Auditing in the following areas checkboxes are transferred from one environment to another, without needing to select any of the system settings for export. However, the Start Auditing is not. When documenting the steps to perform a deployment, make sure that manually checking this important box if you are performing auditing on any of your entities is one of those steps.

 

View Status

A new feature with Microsoft Dynamics CRM 2011 is the ability to deactivate views. For example, I have customers who do not use Campaigns so the native Accounts: No Campaign Activities in the Last 3 Months view is irrelevant. To remove confusion for those end users, I simply deactivate this view. To do this, simply select the view you want to remove from the user interface and select Deactivate. As always, don’t forget to publish.

03 - Deactivate View 

However what we found is that when you import solution into a target system, the deactivated views do NOT remain deactivated within the destination environment. Therefore, if you want to hide these views from the users, you will need to go into the target system and manually deactivate the views again (bummer). If you're writing up deployment notes, please remember to include this step!

 

Default Views and Dashboards

Microsoft Dynamics CRM allows administrators to specify the Default Views and Dashboards that users see when they navigate to a specific part of CRM. Unfortunately, similar to the inactive views gotcha we just explained, the default settings on views and dashboards do not import into new environments as you might exepect them to. Let's explain in a little more detail.

First, let’s look at what happens when you change default views on entities. In my example, I changed the default view on the Account entity in my development environment to Accounts: No Campaign Activities in the Last 3 Months. I then exported a solution containing the Account entity and imported it into an environment where the default Account system view was set to My Active Accounts. The result was two default system views for the Account entity!

04 - Multiple Default Views 

Alternatively, when you import customizations with a different default dashboard, the imported solution ignores that setting entirely.

We were thinking that these were actually defects in the product but Microsoft support informed us otherwise. Apparently they think that the issue with duplicate default views is acceptable behavior since it really only affects users the first time that they view that entity. Each user has the option to set their own default view which overrides the default view (or views!) set by the administrator. The Microsoft CRM support team indicated that the issue with imported solutions ignoring default settings is (a-hem) “by design”. Again, users have the option to set their own default dashboard which overrides the system wide settings. Granted that's a little hinky and it requires an extra step by the user, but it does work.

I hope this helps smooth out some bumps with your deployments and we would love to hear any other gotchas that you would like to share!

Creating Your Own Custom Privilege Settings in Dynamics CRM 2011

Posted by Sonoma Partners on September 9, 2011  |  commentsComments (5)

Today’s guest blogger is Jacob Cynamon-Murphy, a CRM Development Manager at Sonoma Partners.

This post assumes the reader is familiar with how to customize their Application Ribbons and add or revise JavaScript web resources. Special thanks go to my colleague, Bob Lauer, our JavaScript guru.

The problem

In virtually every client project we have implemented for Microsoft Dynamics CRM 2011, clients have had a need for custom settings that we could use with ribbon buttons or other web resources to restrict functionality. These are akin to “Miscellaneous Privileges” in the native CRM configuration.

There is currently no native support for custom privileges (although I have an outstanding request on Microsoft Connect that you can vote up). In the meantime, we have come up with a solution to allow clients to have a generic settings entity definition and some JavaScript to support a set of dynamically growing settings records and a means to wire them up to ribbon button enable rules or web resource functionality.

A specific example that we will consider below is the case of closing opportunities. Natively, having the Update Opportunity privilege allows a user to close Opportunity records as won or lost. If a CRM administrator wanted to restrict the ability to close these records to a subset of users who could edit opportunities, he or she would have used a blank role, assigned it to users granted to “close” privilege and then detect this with custom code. It was effective, but didn’t scale well to additional rules; having many CRM security roles for privilege management could become unwieldy.

The solution

A more scalable solution would allow settings to be defined dynamically by a power user and use common code to to properly restrict the functionality. For our solution, we’re focusing on basic settings that a user can be granted and providing a means to easily retrieve these rules for use in CustomRule definitions within the EnableRules node of RibbonDiffXml.

The entity, which we have entitled Privilege Setting, is a simple entity with a Name field to store the name of the custom privilege. I’ve also enabled this entity for Connections, which allow us to easily enable or disable the users granted the privilege. Administrators can create additional rules very easily through the Dynamics CRM 2011 UI and consume those rules with JavaScript and ribbon customizations, as outlined below.

clip_image001

To take advantage of the power of Connections, I have defined two custom Connection Roles. One, exclusive to Users, is called Has Permission To. The second, exclusive to Privilege Settings, is called Is Granted To. When you create the Connection, you grant a user the permission to the custom privilege. Another benefit of this approach is these roles enhance the understanding of the assignment and know why the association exists.

clip_image002

In this example above, both Jim and I are configured with the ability to close opportunities.

Once the configuration is complete, the next step is to apply a custom ribbon rule to use the privilege setting.

Defining CustomRule JavaScript, you have to produce an asynchronous JavaScript call to retrieve the settings record(s). This technique is outlined in the CRM 2011 SDK in a note under <CustomRule>, although I personally would direct you to Makarand Keer’s blog post which demonstrates the process with a JavaScript sample. I have adapted the script that Keer uses, providing a generic JavaScript method to support retrieving settings records for CustomRules.

Once the entity, connection roles and JavaScript web resources are in place, we have to define the RibbonDiffXml to create rules based on these settings records. I’ve provided a sample CustomRule that would consume a settings record and sample CommandDefinitions that use the CustomRule for CanCloseOpportunities to enable/disable the Close As Won and Close As Lost ribbon buttons for opportunities. This ribbon XML assumes the settings record named "CanCloseOpportunities" exists. The CustomRule for json2.js forces Dynamics CRM 2011 to load the JSON library on which settings.js is dependent; isNaN without a parameter is guaranteed to return true.

CustomRule

<EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity">
  <CustomRule FunctionName="isNaN" Library="$webresource:sonoma_/Scripts/Utils/json2.js" />
    <CustomRule Default="false" FunctionName="Sonoma.Ribbon.Settings.hasPrivilege" Library="$webresource:sonoma_/Scripts/Ribbon/settings.js">
    <StringParameter Value="CanCloseOpportunities" />
   </CustomRule>
</EnableRule>

CommandDefinitions

<CommandDefinition Id="Mscrm.HomepageGrid.opportunity.MarkAsWon">
  <EnableRules>
    <EnableRule Id="Mscrm.SelectionCountExactlyOne" />
    <EnableRule Id="Mscrm.VisualizationPaneNotMaximized" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/_common/scripts/ribbonactions.js" FunctionName="Mscrm.OpportunityActions.close">
      <CrmParameter Value="SelectedControlSelectedItemReferences" />
      <BoolParameter Value="true" />
      <CrmParameter Value="SelectedControl" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.HomepageGrid.opportunity.MarkAsLost">
  <EnableRules>
    <EnableRule Id="Mscrm.SelectionCountExactlyOne" />
    <EnableRule Id="Mscrm.VisualizationPaneNotMaximized" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/_common/scripts/ribbonactions.js" FunctionName="Mscrm.OpportunityActions.close">
      <CrmParameter Value="SelectedControlSelectedItemReferences" />
      <BoolParameter Value="false" />
      <CrmParameter Value="SelectedControl" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.Form.opportunity.MarkAsLost">
  <EnableRules>
    <EnableRule Id="Mscrm.CanWritePrimary" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
    <DisplayRule Id="Mscrm.OpportunityIsOpen" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/sfa/opps/opps.js" FunctionName="complete">
       <BoolParameter Value="false" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.Form.opportunity.MarkAsWon">
  <EnableRules>
     <EnableRule Id="Mscrm.CanWritePrimary" />
     <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
    <DisplayRule Id="Mscrm.OpportunityIsOpen" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/sfa/opps/opps.js" FunctionName="complete">
      <BoolParameter Value="true" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>

We’ve packaged the Privilege Setting entity, the two Connection Roles and the two JavaScript files into a managed solution (download here). This solution can be imported into your Dynamics CRM 2011 environment and consumed immediately; you simply need to create 1 or more Privilege Settings records and revise your ribbon definitions to include CustomRules that call the settings.js library, as shown above. Then connect the users to that custom privilege record to allow access.

Is your Microsoft CRM Ribbon missing in Outlook?

Posted by Matt Weiler on August 22, 2011  |  commentsComments (3)

We've been doing a lot of work with the ribbon in Microsoft CRM 2011. It's much more flexible than the old ISV.config setup from Microsoft CRM 4.0, but that flexibility comes at the cost of complexity. If you've worked with the ribbon at all, you know what I'm talking about!

For a recent client, we added a custom group and button to the main grid for every entity in the Application Ribbon, and then we control which entities the button actually displays for using a DisplayRule. The intent is to not have to include all the entities we want to add ribbon buttons to in our solution, since the entities are commonly customized ones like account, contact and lead. This way, we can also easily extend this button to more entities in the future by simply altering the DisplayRule and not having to touch the entity specific ribbon.

ButtonOnAccountGrid

We had the CustomAction set up something like this, using the {!EntityLogicalName} token to ensure that the action applied for all entities:

<CustomAction Id="Customer.Global.AllEntities.HomepageGrid.Group.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Groups._children" Sequence="110">

And it had a child button that looked like this:

<Button Id="Customer.Global.AllEntities.HomepageGrid.Group.Button.DoSomething" Command="Customer.Global.Commands.DoSomething.Grid" Sequence="10" LabelText="$LocLabels:Customer.Global.Labels.SendMail" ToolTipTitle="$LocLabels:Customer.Global.Labels.DoSomething" ToolTipDescription="$LocLabels:Customer.Global.Labels.DoSomething.Description" TemplateAlias="isv" Image16by16="$webresource:new_/Images/DoSomething_16x16.png" Image32by32="$webresource:new_/Images/DoSomething_32x32.png" />

We used similarly set up buttons in the application ribbon for all entities' forms and subgrids. This worked perfectly in the regular CRM web interface. However, we started to notice that people were having issues with the CRM Outlook integration, saying that the ribbons for CRM were not showing up anymore.

To debug this, we enabled a feature in Outlook you might not know exists: you can enable add-ins to show user interface errors. Go to File -> Options -> Advanced -> Developers, and then check off the "Show add-in user interface errors" option:

OutlookAddonOptions

When we reloaded Outlook, we received a series of errors that claimed that we had duplicate Ids for a ribbon button:

DupeError

We escalated to Microsoft support, confused that our buttons worked with no issue in the Web UI, but caused issues in Outlook. Their response was something that we'd overlooked: you can use the {!EntityLogicalName} token in the Id field as well, not just in the location. It seems that when the XML for the final ribbon is generated, CRM will actually duplicate actions and buttons with the {!EntityLogicalName} token in their location so that each entity has their own copy of the button. This doesn't cause an issue in the Web, but Outlook must handle loading the XML differently and sees multiple XML nodes with the same id which it is unable to handle. Incidentally, this issue only rears its head when using buttons added to the HomepageGrid; buttons on the Form and SubGrid both work fine the way we originally had them set up on the Web and in Outlook.

To solve this, we changed the "AllEntities" part of our ids to be the !{EntityLogicalName} token. Thus our final action looks like this:

<CustomAction Id="Customer.Global.{!EntityLogicalName}.HomepageGrid.Group.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Groups._children" Sequence="110">

This worked like a charm, and the ribbon now loads in Outlook just like it should. Hope this helps!

The CRM Journey – What’s next?

Posted by Ryan Toenies on August 16, 2011  |  commentsComments (0)

Chances are if you are reading this blog post you already use a CRM system.  The biggest change in CRM over the last couple of years has been the transformation to the Cloud.  Even if you still run CRM as an on-premises solution there are still pieces of data that reside in the Public or Private Cloud.  As the Cloud evolution continues we are also seeing businesses adapt to all of the new social technologies.  Twitter, Facebook and YouTube are just a few of the websites where businesses now advertise and communicate with their customers.  Sonoma Partners developed Vibe for Microsoft Dynamics CRM to support social collaboration.  Microsoft has announced that their fall CRM release will contain a native social CRM application.  So with all of these trends what’s next with CRM and what should you know now to prepare yourself for tomorrow?

Mobility – Mobility – Mobility

Always connected – sound familiar?  All the major technology companies are depending on it.  Your world is evolving right in front of you and you may not even know it.  Have you been on a flight lately?  WiFi is starting to become the standard on flights.  So even at 37,000 feet you can still track your CRM email activities real-time.  Crazy!

Mango      Android  iPhone

In conjunction with mobility, “touch” interfaces have become the expectation of consumers.  We are now starting to see these trends work their way into corporations.  I was just on a call last week where a company purchased iPads for their entire sales organization (1,000+).  Microsoft understands this trend is not going away and has been working for a few years to transition their product lines to support mobility and a more immersive end-user experience (like touch).  Enter the “Metro” user interface. The Metro design concept has worked it’s way into Windows, Windows Phone and Xbox. 

One of the core concepts to the Metro experience is Live Tiles.  Live Tiles deliver real-time information to the user in an interactive type fashion.  As an example, if someone posts a message on your Facebook wall that message will appear within the Live Tile for Facebook on your Windows 8, Windows Phone and/or Xbox dashboard.  Think of Live Tiles as a notification engine but on steroids.  Live Tiles allow developers to present real-time information to all of the hardware interfaces you might use on a daily basis (phones, computers and gaming consoles).

Windows8    

Xbox

So how does this impact CRM?  Simple – CRM is all about your customers.  If your customers are communicating with you via email, Skype, Facebook, LinkedIn, Twitter, Foursquare, etc. then your CRM system should support tracking this information in a seamless manner.  Going one step further, your CRM system will need to push and pull data through these applications utilizing new mobility technologies. 

I know, you are reading this and thinking “Xbox,” why is he talking about “Xbox?”  It’s simple really.  Gaming consoles are just another way to communicate with consumers.  Creating an immersive interface that is the same across hardware platforms builds a cohesive ecosystem that becomes familiar to consumers and consistent to developers. 

Microsoft understands our world is changing fast.  If consumers are living on Facebook, watching Live TV on Xbox or conferencing via Skype then we need to be able to communicate and track relevant content with them.  Mobile phones, tablets, laptops, desktops and gaming consoles are here today.  Tomorrow will be another new technology device.  Microsoft continues to innovate with all of their existing products to support these changes and Microsoft Dynamics CRM is no exception. 

To keep pace with innovation in the market, the Dynamics CRM team will be delivering new product functionality every six months.  I suspect that one of the key design pillars moving forward is providing a user interface that takes advantage of an “immersive experience.”  I expect future product updates will take advantage of the Metro design concepts and more specifically, Live Tiles. 

Tomorrow

Sonoma Partners is highly invested in Microsoft Dynamics CRM because this is all we do.  We eat our own dog food by using Microsoft Dynamics CRM to run our business (from A-Z).  To help prepare our consultants for tomorrow we are attending the “Build” conference next month in Anaheim, CA.  We are looking forward to building new and exciting CRM applications for Windows 8, Windows Phone and other mobile technologies. 

Build

If you’re not attending Build don’t worry about it.  Just follow them on Twitter and Facebook to stay up-to-date with all of the latest information.  You can also follow us on Twitter and watch for Tweets about the next generation of Windows and how CRM will evolve. 

Cheers!

Are you Missing Outlook Reminders with Office 2010 SP1 and Microsoft CRM 2011?

Posted by Sonoma Partners on August 16, 2011  |  commentsComments (5)

Today’s guest blogger is Peter Majer, a CRM Sr. Consultant at Sonoma Partners.

Recently, the Office 2010 SP1 was delivered through Windows Updates, and many people in our office who have the Microsoft Dynamics CRM 2011 Outlook Client installed have been reporting that Outlook reminders are no longer working. The only obvious workarounds would be to either uninstall the CRM 2011 Outlook Client, or uninstall Office 2010 SP1. Obviously I didn’t want to uninstall the CRM 2011 Outlook Client as I use it daily to track emails sent to our customers. Uninstalling Office SP1 also wasn’t ideal, as we have a custom Microsoft Word add-in that we built to integrate data between Word and CRM which stopped working after uninstalling Office SP1.

This issue only appears to be occurring when you have both the Office 2010 SP1 installed, and the CRM Outlook Client configured:

  • CRM Outlook Client Configured + Office 2010 = Reminders Work
  • CRM Outlook Client Not Configured + Office 2010 = Reminders Work
  • CRM Outlook Client Not Configured + Office 2010 SP1 = Reminders Work
  • CRM Outlook Client Configured + Office 2010 SP1 = Reminders Don’t Work

There’s a forum post that has been logged identify this issue, and Microsoft is aware of the issue. They’ve created a KB Article to track this issue which will be updated once they identify the fix. After a fix is found, I assume they’ll roll that into a future UR.

Fortunately, after playing around with the Outlook Client, we were able to come up with a workaround that allows you to have both the Microsoft Dynamics CRM 2011 Outlook Client installed and configured, along with Office 2010 SP1 installed, and your Outlook reminders will still appear. Here are the steps to perform this workaround:

1. Un-configure your CRM Outlook Client installation

Outlook must be closed at this point to start the CRM Configuration Wizard. You can do this by running the Configuration Wizard which is typically found in Start-> All Programs -> Microsoft Dynamics CRM 2011 -> Configuration Wizard. Select the Organization(s) that you’ve configured your Outlook Client for, and select “Delete”
clip_image002

2. Startup Outlook and Configure the CRM Outlook Client

When Outlook starts, it should realize that the CRM Outlook Client is installed and not configured, and then prompt you to configure the CRM Outlook Client. Go ahead and enter in your Server URL and select the correct Organization. Complete the information and click OK.
clip_image003

Your Outlook reminders should once again be firing, and CRM will be configured and available for use.

clip_image004

Unfortunately, you’ll need to go through these steps again each time you restart Outlook. While certainly not ideal, I hope this workaround will keep you working until a resolution is provided by Microsoft.

Enjoy!


Contact Us for a Quote, or Personalized Demonstrationof Microsoft Dynamics CRM for Your Business.

Contact Us