Quantcast
Channel: Magnetism Solutions Dynamics CRM Blog
Viewing all 987 articles
Browse latest View live

Fixing a Broken Add Email Button for CRM 2015 Cases in Outlook Client

$
0
0

There's a very conditional error that occurs when using both Microsoft Dynamics CRM 2015 and the Outlook Client 2015 to connect to it. The bug occurs when you select an existing case, go to the Add tab and click Email - nothing happens. This is interesting because the other buttons such as Phone Call and Task work fine, properly opening a record in a new window.

image

Searching around for solutions to the error or other reports of its occurrence didn't turn up much, so it might be that this bug is very specific to a certain set of conditions, or perhaps nobody has taken notice of it until now. If you're experiencing this issue, you might be happy to know that we've come up with a workaround.

After some investigation and debugging, it turns out that the bug lies fairly deep in some Microsoft JavaScript that's triggered by the button, which crashes before it gets a chance to open a new Email window. After a bit of tweaking, we came up with a fix which can be packaged into a small solution containing just the Case entity and a custom JavaScript file.

To replicate the fix, firstly you'll need the Ribbon Workbench to make a slight tweak to the ribbon button. You can get this from http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx, if you don't have it installed in your development environment already. Just follow the installation instructions from their website before reading further. The product comes as a managed solution which you install into your development system like any other solution.

With the Ribbon Workbench installed, next create a new unmanaged solution. This will be your hotfix solution for the bug, so name it something appropriate and add the Case entity to it.

You also need to create a new JavaScript web resource containing a small amount of JavaScript to fix the issue, so create a new one and name it something like ButtonFix.js. Populate the file with this JavaScript fragment:

Mscrm.AddActivity.getPartyDetailsForRefreshForm =function(entityType) {returnnull; }

Your solution should look similar to this:

 image

Now save the solution and open the Ribbon Workbench. When it prompts you for a solution to load, select the one you've just created and wait for it to finish loading.

Now to go the Ribbon, then the Add tab, then right click on the Email button and select Customize Command.

image

You'll want to find the command named Mscrm.SendEmailToSelectedRecord – this is the command that fires when the user clicks the offending button. Right click on it and click Edit Actions. Here's where we'll add a new action that gets triggered before the default Microsoft one.

image

Click Add to add a new action, choose a JavaScript Function Action, and then click on the up arrow next to the list of actions to move the new action to the top of the list.

Put 'IsNaN' into the FunctionName field, and in the Library field you need to select the JavaScript web resource which you created earlier.

image

That's all the customization you need to do to the ribbon, so you can click ok on that dialog, hit the Publish button in the top left corner, and wait for the lengthy publishing process to finish. You've now got a solution which contains one JavaScript web resource and some ribbon changes added to the Case entity. Simply deploy the solution to the environment which Outlook connects to and the issue should be resolved.

With any luck, Microsoft will address this issue in a future patch, but for now we can at least work around it with this fairly simple fix. Hopefully this blog can save you some time and hassle, however uncommon this bug might be.


Microsoft CRM SSIS import failure due to truncations

$
0
0

While importing a CSV file into Microsoft CRM 2016 using a SSIS Integration Services Project, I encountered this error:

Data conversion failed. The data conversion for column "Street 1" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.

Error: An error occurred while processing file "Contacts Import.csv" on data row 92.

Initially I thought this was an issue with the size of the file. As I was importing over 4000 records. This turned out not to be the case as when the offending row was removed the import continued until it reached its next problem row.

Turns out each column has a maximum width in the Connection Manager. The import uses this metadata when it parses the CSV file. So when there is a field that exceeds its limit this error is thrown.

Follow these steps to increase the maximum width on any columns that throw this error.

1. Open the Connection Manager for the data source you need to edit

image

2. Go to Advanced Settings

image

3. Select the field that needs to be increased

image

4. Increase the field length

image

5. After you increase the field length anywhere you have used this connection will have to refresh its metadata the Source from your data flow will show up with a warning. You just need to open the element and the metadata will refresh

image

Register CRM 2016 Plugins and Steps Programmatically

$
0
0

We recently needed to programmatically register plugin assemblies and steps into a Microsoft CRM 2016 system. The registrations are done using the standard Create SDK calls. There are no need to call/execute any special requests against the Dynamics CRM API.

Few things to note, you’ll need to execute these steps in order to register plugins and steps dynamically.

  1. Create a record of type “pluginassembly”
  2. Create a record of type “plugintype”
  3. Create a record of type “sdkmessageprocessingstep”

Creating the pluginassembly record

The pluginassembly record require quite a few fields to be registered successfully. We’ll assume that you already have a plugin that you’d like to register and that, that plugin can be registered successfully via the Plugin Registration Tool. This is to ensure you won’t run into random trouble around the plugin by not having a strongkey, a sample plugin with an execute method etc.

First step is to dynamically load the assembly using reflection. We do that by using Assembly.LoadFile. This will allow us to dynamically grab the plugin information such as, the name, culture, version, publickeytoken.

Next we need to specify where we would like to store the plugin, e.g. database or disk. We recommend that you use the database option.

Once that’s done, we need to specify the isolationmode, e.g. sandboxed or none. We recommend that you use the sandbox mode unless it is a must…using the sandbox mode ensures the plugins are compatible with the CRM Online environment.

image

Creating the plugintype record

A plugintype record must be created for each plugin inside the assembly. This can be done dynamically using reflection, for the purpose of this blog let’s have a look at a simpler example.

Firstly we need to link this plugintype record to the pluginassembly record that was created in the above step. The next piece of information that this record need is the typename.

The type name is the plugin class name. e.g. If you have a plugin called “SayHello” inside the namespace “Abc.Plugins”. The typename should be set to “Abc.Plugins.SayHello”.

image

Creating the sdkmessageprocessingstep record

Final step is to create a record for each of the messages you’d like to hook into. There are a number of attributes that must be set correctly in order for this to work. Similarly to the plugintype record, you must now ensure the step record is pointing at the correct plugintype record.

To specify the message you’d like to hook into, the guid of the message is required. To get the id/guid of the message you can query the sdkmessage entity using a QueryExpression or FetchXml.

To specify the entity that this plugin will run on, set a value for the sdkmessagefilterid attribute. If a value is not provided then this plugin will run on any entity. To get the id/guid of the sdkmessagefilter, simply query the sdkmessagefilter entity using a QueryExpression or FetchXml, filter by the sdkmessageid and primaryobjecttypecode. The primaryobjecttypecode is the schema name of the entity. e.g. account or “xyz_somecustomentity”

image

Other attributes such as name, configuration, mode, rank, stage, supporteddeployment, invocationsource are outlined above with comments and can be set based on your requirements.

The Dynamics CRM API will throw detailed errors if any of the above combinations of configurations/attributes don’t align. e.g. trying to register a plugin on the Won message for an account…

Unusual Form Load times with Dynamics CRM 2016

$
0
0

With the new Turbo Forms feature in Dynamics CRM, users should see a huge difference in performance. However, different configurations and optimizations can lead to unusual performance issues. One we’ve seen recently is very slow Form Load times. There are a number of things that can attribute to slow form load times. One common issue that’s overlooked is how the network is configured. Dynamics CRM and SQL can be tuned to hum but if the network configuration is bad you’ll notice the difference!

One thing to check is that the correct response headers are returned in regards to compression. Compression settings can make a big difference. For example, CRM internally makes multiple requests to RibbonLayout.js.aspx based on the number of sub-grids you have on a form. Each request should be between 15-20kB in size when compressed. However, when uncompressed the size balloons to about 200-250kB. If you have 5 sub-grids on a form, more than a megabyte of data travels through the wire!

So, to see if you might be subject to compression issues try the following.

  1. Open up Fiddler and start capturing (if you have SSL or an IFD setup, make sure Fiddler can decrypt traffic)
  2. Open up a CRM 2016 record
  3. Stop the capture and look for a request that contain RibbonLayout.js.aspx
  4. Ensure that the response headers look like the image below

image

The following can be signs of a bad configuration:

  • Missing Vary: Accept-Encoding header
  • Missing Content-Encoding: zip transport header
  • Extra Connection: Keep-Alive header

These are very common with WAN Optimizers such as Riverbed. So please make sure that:

  • Compression stripping is turned off
  • Keep-Alive’s are not being inserted
  • Authentication header stripping is turned off

Beware when setting the database compatibility level on a CRM 2016 system

$
0
0

Recently, we came across a bizarre SQL timeout issue when opening a record. After digging deeper we tracked down the query that was causing the problem. The issue is, if you have a Dynamics CRM 2016 system with an entity which has over 5 secured fields (via Field Level Security) and the SQL server database compatibility level is set to a value higher than 110, the SQL query optimizer incorrectly estimates the number of records.

For example,

Here is the query that causes the problem

The SQL Query Optimizer badly assumes/guesses the number of rows, as you can see below, the estimated number of rows is 10 even though there are no rows!

clip_image001

What happens is, SQL compounds, if you have 10 secured fields, the estimated number of rows is 10 ^ 10 = 10,000,000,000!!!. If you run the query and tell SQL to show you the estimated or actual query plan, you’ll see a warning ‘No join predicate’. This is actually a serious error!

The fix for now is to set the SQL database compatibility level to 110.

Dynamics CRM Live View - tell us your idea

$
0
0

crm-live-view-example2

We thought it would be interesting to see if we could visualize Dynamics CRM system usage by users throughout the system similar to the way Internet attacks are displayed (https://cybermap.kaspersky.com). You might be wondering why you’d want to do that, well, it’s always interesting looking at a live animation rather than a static 2D/3D chart on a dashboard.

Imagine, if you’re able to get access to what’s going on with Dynamics CRM in near real-time to info such as dashboard/chart views opens/refreshes, record creates, updates, deletes, advanced finds, inbound emails, outbound emails, record deactivations, activations, case resolutions, lead qualifications, opportunity wins, invoice payments…pretty much anything!

Similar to the Internet attack map, we’d like to know how you’d like to see CRM information displayed on a fun interactive…something…The ‘something’ being your idea.

This is a work in progress, here is a sneak peak at what we have so far. So far we have been able to hook into any Dynamics CRM system (2011, 2013, 2015, 2016, Online, On-Prem) and capture what’s going on in near real-time. We can capture all information that come through the IPluginExecutionContext.

crm-live-view-v2

We would love to know your ideas around how you would like to see CRM usage displayed in a fun interactive way…

Hiding Side-bar Fields in the CRM 2016 Interactive Service Hub

$
0
0

The CRM 2016 Interactive Service Hub has a lot of similar functionality to vanilla CRM that's presented in a new format, including the old ability to create a new record of an entity from a lookup field by clicking the '+ New' button.

However, if you do this within the Interactive Service Hub, instead of opening a new window or tab for the new record as you're probably used to seeing in vanilla CRM, a new bar will open from the right hand side of the screen which presents the same form in a different layout.

I tried to find the official, Microsoft-approved terminology for this area but I came up empty, so I've started calling this the side-bar. The side-bar is clearly designed to make it faster and easier for users to create new records from within another record, and to be fair it achieves these goals, but there are some downsides. The downside that this blog focuses on is how the side-bar seems to ignore the visibility settings you so carefully laid out in your form design.

Take this form for example, I didn't want the Name and Owner fields to be visible so I added them to a new section called 'Hidden' (although nobody should ever actually see it), then changed the default visibility of the section to hide it. This works perfectly well in vanilla CRM, and it's a nice, easy way to make fields on a form invisible without actually removing them.

However, now let's try to create one of these records from within the Interactive Service Hub and see what happens.

It ignores my reasonable requests to hide the section! Users might get a bit confused when seeing a section that's labelled 'Hidden' on a form, so we should probably work around this limitation. Thankfully there's a way to do using only customizations; no code or development time to hack our way around it.

Business rules save the day for us this time – just create a new business rule for the entity, call it 'Hide Fields' or whatever you want, and make it hide every field that you want hidden. There's no need for conditions unless you want them.

Save, activate, and publish the rule to see the results.

Cool, now we're back to the functionality you'd expect! Except you can still see the 'Hidden' section, so just move the hidden fields into a visible section and you're back to normal. With any luck, Microsoft will fix the side-bar and remove the need for this workaround entirely, but until then you can fix your broken side-bar with a few minutes of extra customization.

QueryExpression Filter Lookup by Name instead of ID CRM 2016

$
0
0

In CRM if we want to filter a query using a particular lookup value, e.g. if you had a lookup to Country and you wanted to query all Accounts where the Country is New Zealand, you could achieve this in a couple of different ways.

The first and most obvious way, is to directly reference the country in your query. If you're adding conditions to a view, advanced find, workflow, or business rule, this means selecting the lookup value, which stores the ID of the selected record in the condition.

If you're writing a QueryExpression in a C# plugin for example, you'd need to get the ID of the country and reference this in the query, e.g. 'new_countryid' equals '<guid>'.

Referencing the record by ID may work ok in your development environment, but as soon as you deploy the solution into a new environment where the reference data has different ID's, the query will break, as that ID is no longer valid.

The other common way to achieve the desired filtering, is to join on the reference entity, in this case Country, and filter on the Name directly, in this case New Zealand. This is much more reliable as unless the name of the reference data changes, the queries will always reference the same record regardless of changing ID's in different environments.

The above method works ok most of the time, but it's annoying to have to add a link entity, and it doesn't always work if you're doing complex filters, or if you're doing business rules where you can't filter on related entities.

An easier solution is to leverage the lookupidname attribute, which is available in fetch and query expressions when you're creating views, advanced find queries, workflows, business rules, and also plugins. This attribute is only available in conditions, i.e. you can't add it to your columnset, but it can be queried directly through code, e.g. 'new_countryidname' equals 'New Zealand'.

Using advanced find, views, workflows, or business rules is a bit different, since you can't directly select this attribute for conditions. However, if you query the lookup field using the Contains, Begins With, or Ends With operators, you'll be able to provide the text value to query against. When you download the FetchXML you'll notice it's actually querying the lookupidname attribute.

Querying like this essentially gives us the same result as adding a join, however the query is faster to create and execute, and we can build more complex filters without worrying about the limitations of business rules or using 'Or' conditions across entities.


Issues with IFD and Dynamics CRM 2016 Update 0.1

$
0
0

While performing test patch updates to our clients in Auckland, Wellington and Christchurch we encountered strange behaviours with Microsoft Dynamics CRM 2016 Update 0.1.

Microsoft Dynamics CRM 2016 Update 0.1 fixes a lot of issues with the RTM build of CRM 2016, but also introduces some major problems if your deployment is enabled for IFD. The most critical of the issues is that reports will stop working when using the internal IFD URL, which users will prefer to do as it allows them single sign-on. This article describes these issues in more detail, with possible workarounds.

Issues Identified

The following issues were identified when using CRM via the internal IFD URL, e.g. https://crminternal.domain.com/<orgname>

  1. When running both standard and custom reports, the report viewer would show a blank page
  2. The Interactive Service Hub would show a 404 Page Not Found error

Why does this happen?

To investigate the reporting issue, we enabled tracing on the CRM server and ran both standard and custom reports with the internal and external URLs.

Tracing first with the internal IFD URL showed the following error: Expected non-empty string. Parameter name: userPrincipleName

At first, this error suggests that it might be an issue with the Relying Party Trusts in ADFS, but this was not the case. Analysing the trace closer shows that the unique identifier (GUID) for the CRM organisation was missing at the point where CRM checks if Reporting Extensions is installed.

Compare this to the trace for the external IFD URL which does not throw any error and maintains the unique identifier for the CRM organisation.

Possible Resolutions

  1. If feasible, ask all users to navigate to CRM using the external IFD URL, e.g. https://<orgname>.domain.com. This will allow users to load standard and custom reports, and also use the Interactive Service Hub. Note that users will be prompted to login every time they want to use CRM
  2. Rollback to Microsoft Dynamics CRM 2016 RTM. Several forum posts suggest that this approach will work, but I have not verified this myself
  3. Contact Microsoft Support and request a hotfix. This is the approach we took and the hotfix resolved the issue with reports and the Interactive Service Hub

Please take this as a lesson before applying any updates to your CRM systems. It is important to review and understand the KB articles on the Microsoft website to see which bugs are being fixed, and how it could affect your CRM implementation. Take the following approach:

  1. Install the update on a non-production server that closely resembles the production system.
  2. Configure IFD if required to validate that the system will still work when the update is applied to production.
  3. Check that integrations can still connect to CRM and function when using IFD URLs.

Dynamics CRM Share a Personal View with SYSTEM User

$
0
0

Why would you want to do this? Well if you’re reading this you probably have a good enough reason. My reason was because we needed to retrieve a personal view in a plugin. It needed to be a personal view because certain users should be able to edit the view, and we can’t give users access to customize system views.

However because any user can trigger the plugin, all users would need to be shared at least read access for the personal view to actually retrieve it. I didn’t really want to do this either since it wouldn’t make sense if a normal user saw the view. Naturally you’d assume running the plugin in the SYSTEM context would allow you to retrieve the view regardless of sharing, but you’d be wrong.

Even though SYSTEM might have full admin privileges, the view still needs to be shared before it can be retrieved (same goes for any admin). So the solution seems simple enough, share the view with the SYSTEM user. Problem is, you can’t actually do that through the UI. Not only do all the system views for user filter out the SYSTEM user by default, but even if you create your own view which includes SYSTEM, when you try to select that view while sharing, it just excludes the SYSTEM user anyway for some reason!

image

However! While the UI prevents us sharing with the system user, the good ol' reliable SDK is here to save the day. I’m going to assume you already have access to a console app or something that can connect to CRM, since only a programmer would care about the SYSTEM user in the first place.

So basically just execute a Grant Access Request using the SYSTEM User ID and the Personal View ID (the user running the console app will need to already be shared with the view).

QueryExpression view =new QueryExpression("userquery"); view.Criteria.AddCondition("name", ConditionOperator.Equal, "<The Name of the View>"); Guid viewId = _sdk.RetrieveMultiple(view)[0].Id; QueryExpression user =new QueryExpression("systemuser"); user.Criteria.AddCondition("fullname", ConditionOperator.Equal, "SYSTEM"); Guid systemUserId = _sdk.RetrieveMultiple(user)[0].Id; var request =new GrantAccessRequest { PrincipalAccess =new PrincipalAccess { AccessMask = AccessRights.ReadAccess, Principal =new EntityReference("systemuser", systemUserId) }, Target =new EntityReference("userquery", viewId) }; _service.Execute(request);

Once that’s done, the view should be shared with SYSTEM, giving them Read access, which is enough for them to retrieve the view in a plugin, for example, while executing under system context.

image

Programmatically Uploading Files to SharePoint

$
0
0

The SharePoint .NET client API provides a few methods which developers can use to upload files to a SharePoint server. Deciding on which one to use mostly depends on whether the file is larger than 2Mb, as SharePoint doesn’t allow you to upload files above that size using certain methods.

If you’re reading this blog, I’m assuming you’re interested in the sort of scenario that involves uploading existing files from a PC to a SharePoint site using a C# program. If you’re not interested in this kind of thing then you might be a bit bored, but I can’t stop you from reading so let’s get on with it.

Let’s take a look at the FileCreationInformation object – we can use this with an API call to specify a file to upload, and how to upload it. You can also set another flag to say whether you want the file to overwrite existing copies or not, which is something you might want to be careful setting. The properties we’re most interested in are the Content and ContentStream properties, as demonstrated here:

image

If you use the Content property to upload your file, it needs to be smaller than 2Mb in size or else SharePoint will refuse to let you upload it. That’s because you have to attach the entire contents of the file to the FileCreationInformation object as a byte array if you’re using that particular property.

On the other hand, you can also use the ContentStream property which accepts a FileStream instead of a pure array of bytes. Working with FileStreams can have a couple of advantages over byte arrays – in this scenario it allows the SharePoint API to stream the contents of the file to the server in a more manageable and reliable manner. With larger files, SharePoint is much more comfortable receiving the data in stream format and it’ll happily accept more hefty files (the upper limit is 50Mb by default but can be adjusted in the configuration).

I also lied two paragraphs ago; you can increase the maximum file size that SharePoint accepts while still using the Content property if you want, but there are reasons not to do so. The primary concern is that uploading larger files in a single message increases your odds of experiencing a timeout or other upload failure, but if you’re happy to take that risk then there are a couple of ways to tweak the settings.

Now that we know our limitations, let’s get a code snippet to conditionally upload a file using either a byte array or a FileStream, depending on the size of the file:

image

This code snippet will get your file into memory in whichever way is most appropriate. You might notice that I’m doing an “if (filesize > 1300000)” check, which is somewhat less than the 2Mb limit I mentioned earlier. This is because of the overhead that gets added to the message from its headers and extra information sent to SharePoint. So in reality you can try to upload a file that’s 2Mb in size using a byte array, but SharePoint will check the actual size of the whole message and probably ruin your plans. During my tests I found that roughly 1.3Mb was a safe value to use for this check, but you can feel free to fiddle around with higher values to see if you can squeeze some extra efficiency out of your uploads.

Once we’ve got our FileCreationInformation object nicely formed, we can send it off to SharePoint for processing:

image

 

You’ll notice that we nicely dispose of the FileStream if we used it earlier, so we don’t have open handles to system resources lying around when we shouldn’t. The ‘list’ and ‘context’ objects are required to perform any of this logic, but setting up a general SharePoint program has been covered a lot elsewhere so I won’t document the process of setting those up.

As an addendum, if you’re looking for a way to upload particularly large files using a batched process, you might want to check out the StartUpload method on the File class (in combination with ContinueUpload and FinishUpload). SharePoint supports using these methods to upload large files in chunks of data, allowing you to have finer control over the streaming process.

Thanks for reading, and happy SharePointing.

Filter N:N Add Existing Lookup Dynamics CRM 2016 Turbo Forms

$
0
0

In CRM 2016, when turbo forms are enabled, pretty much any unsupported code will break. Usually it’s easy enough to add a ‘parent.’ To the front of any unsupported code, however if you’re using the code from my blog post on how to do this in CRM 2013, there’s a few tricky things that need to be updated as well.

I’m not going to go into detail about how the code works, instead I’m just showing what the updated code should be. If you want the extra details check out the previous blog posts on how to do this for CRM 2013 and CRM 2011.

To get this working in CRM 2016 with Turbo Forms, you'll need to append all the unsupported references with 'parent.'. Also, you should change the ‘var parent’ to something else like ‘var parentObj’ so it doesn't overwrite the DOM parent.

To make this easier, I’ve declared a new crmWindow variable, which makes use of the internal method of checking if turbo forms is enabled, so this code will work in CRM 2016 whether turbo forms is enabled or not. This variable also replaces the ‘context’ variable in the old code, which was just a reference to ‘this’ (the current window).

The full updated code is below, with changes to the CRM 2013 code being highlighted:

image

Gotcha with creating personal email templates programmatically

$
0
0

Recently while trying to programmatically migrate Personal Email Templates between CRM organisations I got this error:

“An unhandled exception of type 'System.ServiceModel.FaultException`1' occurred in Microsoft.Xrm.Sdk.dll Additional information: An unexpected error occurred.”

Event Viewer didn’t give much more information either:

The Web Service plug-in failed in OrganizationId: 6608e5d4-4fef-e211-b192-00155d0c8332; SdkMessageProcessingStepId: 5dcabb1b-ea3e-db11-86a7-000a3a5473e8; EntityName: template; Stage: 30; MessageName: Create; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.InvalidCastException: Specified cast is not valid.

After a lot of digging I found the problem to be in the templatetypecode.

While according to CRM this is an option set when you look at the attribute metadata is states that it is in fact an “EntityNameType” where other option sets are “PicklistTypes”.

So rather than taking the integer value of this option set I did in fact have to take the string.

Working with Related Knowledge Articles in CRM 2016 Interactive Service Hub

$
0
0

With the release of CRM 2016 we gained access to the new and improved Interactive Service Hub, designed by Microsoft to replace the old knowledgebase functionality of previous versions, as well as to provide a host of new features for CRM users who work primarily in service.

Part of the new knowledge article functionality is the ability to relate one article to another – for example, you might have an article called ‘Troubleshooting Keyboard Problems’ and relate it to an article called ‘Fixing a Stuck Key’. This is a fairly common and useful tool in such knowledge systems.

image

Another new feature is the ability to create new versions of an article without modifying the old ones by using major and minor versioning. Your keyboard troubleshooting article can start at version 0.0 and iterate through 0.1, 0.2, 1.0, 1.1, etc., as time goes by and more adjustments are made. This makes it easier to manage changes, so you can maintain a full history of an article’s changes rather than having to wonder exactly when you added the paragraph about mechanical keyboards.

However, let’s think about the ability to relate articles to each other: if version 0.1 has a related article and you update it to version 0.2 what should happen? Presumably you want the same related article to follow you through all versions instead of having to relate each article every time you make an update. This is the assumption that Dynamics makes, and it has a system in place for this in the background.

Whenever you relate one knowledge article to another, CRM creates two Connection records in the background (not an N:N relationship, as you might expect) and it sets the roles to Primary Article and Related Article. Interestingly, the relationship is one-way due to the limitations of Connections, meaning that if you relate Article A to Article B then Article B won’t automatically be related to Article A. If you want to create the full, two-way relationship you need to go to Article B as well and relate it back to Article A. Furthermore, the Connections are actually created between the root articles – non-versioned copies that Dynamics keeps separate just for this kind of thing.

So what if you want to find related articles using a C# QueryExpression? Once we know how it works in the background, the queries themselves aren’t too hard. Here’s one that finds all related articles in the system:

image

Or a query that finds related articles for a given article:

image

I hope this article might save you a bit of time if you ever have to deal with related articles in the Interactive Service Hub.

10 things you may not know about Immersive Excel

$
0
0

A new feature in Dynamics CRM 2015 Update 1 was ‘Immersive Excel’. This allows you to export data in a view from CRM to Excel Online, edit the data there, and then save those changes back to CRM. You never leave CRM, the Excel Online window opening up right there within CRM. It’s a really quick way of editing multiple records for the same entity very quickly.

It’s only available in Dynamics CRM Online.

To do it, just select ‘Export to Excel’ from the command bar of a view and select ‘Open in Excel Online’:

image

This presents the data in a spreadsheet:

image

You then make your changes and select ‘Save changed to CRM’. Your changes will be visible in CRM a minutes or so later, depending on the number of rows in the spreadsheet.

Since it’s been around for a while now, I decided to take a closer look at Immersive Excel and test its limits. A few things I found surprised me, so I decided to share them. Some of these things you may know already, and others may be new to you.

1)    Can you add records using Immersive Excel?

Yes, you can. Just add them to the bottom of the list (or the top or middle for that matter), and when you save the changes to CRM they import, assuming of course they don't error.

2)    Can you delete records using Immersive Excel?

No, you can't. If you delete a row from the spreadsheet, it doesn't delete from CRM.

3)    Can you export to Excel Online from any view, system or personal?

Yes, you can export a system or personal view. However, you can't export to Excel Online from an advanced find, you have to save the view first.

4)    Does immersive Excel respect duplicate detection rules?

Yes. In fact, there seems to be no way to turn it off, as there is with normal imports.

5)    Can you export just some of the records in a view using Immersive Excel?

No, you can’t. If you select one or multiple records in a view and then use immersive Excel, CRM exports all the records in the view to Excel, not just the records you selected. This seems a little counterintuitive.

6)    Can you add/change/delete a value in a read only field using Immersive Excel?

Yes, you can. Again, this surprised me.

7)    What if you delete a value from a required field using Immersive Excel?

It lets you do it, and saves the record back to CRM. Again, a surprising outcome. I expected it to error on import at least.

8)    What if you have a field from a parent entity in your view? Can you change data for that too using Immersive Excel?

No you can’t. It lets you change it in Excel Online, and the import doesn’t error, but it then doesn’t change in CRM. I tried it by adding the parent account's main phone to a contact view, and changing that main phone in Excel Online. It didn’t change in CRM.

9)    Are there any entities you can't use Immersive Excel for?

You can't re-import activities if it is a view of different types of activities that you exported, e.g. the 'My Activities' view. The option to re-import is not there when you export to Excel Online. However if you go to a view of a specific type of activity, such as tasks, you can re-import those.
There is the odd entity you can't use it for, such as Competitors and Quick Campaigns (although funnily enough you can use it for Campaigns). However it seems that almost all entities can use it.

10)    Can you change inactive records using Immersive Excel?

Yes you can. Again, surprising to me, and could potentially be abused.

So, there you have it. A few things to consider when using Immersive Excel.


Do you need a CRM Vendor or a CRM Partner?

$
0
0

CRM vendors and partners provide different services, operate differently and think differently. It’s important to know which you need and how to work with either a vendor or a partner to maximise results

image

The CRM vendor

The CRM vendor’s business model is selling CRM services: they undertake CRM projects and tasks as specified by the client. The client knows the detailed scope of their projects and what is required of the vendor.  Services required are similar from project to project. The client is in charge of the process and the vendor needs to be expert at what they do and able to respond to changes and feature requests.

When a CRM vendor is best

  • When the CRM system is simple. Many systems, particularly SME systems, are simple because simple is less expensive to buy and less expensive to run. You don’t want or need a lot of customisation – you just want to get the system up and running and your team trained to use it.
  • When the system is standard.
  • Your processes fit or will be made to fit an existing CRM system with minimal customisation.
  • When you understand well both CRM and your CRM strategy.
  • You know the specifics of what needs to be done and you can specify it in terms that a CRM vendor can understand clearly. You could do it yourself if you only had the specialised resources available.

 

Working with a CRM vendor

The same rules apply as for any vendor. Get quotations or tight estimates for cost and delivery and manage the vendor to deliver on time and within budget. Be careful to specify exactly what you need as your specifications will be your primary means of quality control.

The CRM partner

The CRM partner helps craft the CRM strategy and roadmap that drives the client’s project and task needs.  Then they undertake those projects and tasks. The CRM partner contributes to the client’s strategy by bringing expertise about CRM and CRM strategy to the decision-making process so that better decisions are made. The CRM partner is thus more invested in the success of the CRM strategy and the CRM implementations and will question any projects, tasks or changes that are inconsistent with the agreed strategy.

When a CRM partner is best

  • When the system is complex and customised.
  • Enterprise-level CRM systems are all complex and are frequently customised/optimised to fit the established systems of the client. The more users, the more customisations for productivity become cost-effective.
    AND when external input on CRM and CRM strategy knowledge would lead to better CRM decisions and plans.

 

Working with a CRM partner

Partnering involves working together at the stage when the scope is fluid and the costs are unknown. The partner will charge for consulting and advising - either explicitly or by building the cost into projects. You need to know up-front how you will be charged. I recommend time and materials for consulting and estimates for project work.

You still need your partner to be skilled and efficient in CRM analysis, design, development, implementation and support and you should expect them to provide project pricing and plans as for a vendor.

A key difference will come when you want to make a significant change mid-project. The CRM partner will not automatically do what you ask. The project was a result of joint strategic thinking so there will be push-back and questioning of the change to ensure it has been properly thought through. This may involve delay, but generally you will value the benefit of the strategy-check over the cost of the delay.

At times, important things may be left unspecified in the interests of flexibility. This works because the CRM partner understands the context and the strategy behind a project meaning not every detail needs to be spelt out.

Trust

Partnering involves a much higher level of trust and trust involves risk. You need to prove yourself trustworthy as a client and you need to give the CRM partner opportunity to prove themselves trustworthy. Yes there’s risk. But the benefits of an optimised CRM strategy, a roadmap that is informed by advanced CRM knowhow, and a partner who sincerely seeks to serve your interests is well worth it.

Test Strategy and Planning with XMind

$
0
0

Testing is a critical component in the software development lifecycle as it defines the quality of the software product to test. It is the process of validating and verifying the software product such that it meets business and technical requirements during the planning, design and development process. Testing also ensures that we find defects as early as possible in the lifecycle such that we minimise further costs compared to running into them during deployment. Test planning is a systematic and organised approach in testing such that we can plan and methodically layout testing, and what tests we will execute in a project. Using XMind is a great tool in testing, especially for software products such as Microsoft Dynamics CRM, so that we can manage our testing easily with the added ability of visually laying out what we need to test.

Software products and systems contain numerous components and information that we need to test. While we can never fully replace the approach of a detailed documented software test plan, we can use tools like XMind to enforce the testing process during the requirements analysis and test strategy phase. XMind is a mind mapping tool that is used to clarify thinking, manage complex information, and organise work accordingly. Complex projects such as in Microsoft Dynamics CRM involve numerous components (such as entities, clients, portals and data migration). XMind allows us to layout all of these components and the testing tasks we can execute.

We can use this for testing by laying out or grouping relatable tasks from the design documentation and schema. We are able to systematically group then map components such that when we actually get to test. For example, in context of testing software relating to Microsoft Dynamics CRM, we test for various CRM entities such as the Contacts entity. In terms of test planning, we lay out all the relatable components to test such as Entity Definition, Fields, and Relationships.

An example of a simple XMind mind map is shown below to show a layout of a test strategy in Microsoft Dynamics CRM (for demonstration purposes only).  We can group similar components together, then branch out any relatable aspects and conditions to test in XMind. It also equips the planner with various other visual elements such as colour, styles and symbols to help visualise anything in the map.

image

We can use colour to group and distinguish Entities (light purple) from other components to test in Dynamics CRM.

While it may sacrifice other details, it allows the tester to outline and visual the test plan overall while looking at the most important aspects of the project grouped together. While the trade-off is that it is can be an informal documentation process, it is a process planning tool that can be made quickly. It also allows the tester to dump information quickly and visualise information. As a visual aid, it helps with the thinking process and visually project representations in order to ease the mental load. From here, we can further strategize our approach in conducting our testing.

We can also map out test cases to execute in order to test conditions, process and business logic. Mapping out conditional branches can be done easily so that we can know what conditions to test out.

Again, for example, if we are testing our plug-ins in Microsoft Dynamics CRM given the business logic:
IF Field Age >= 65 AND Field Country = “New Zealand”, THEN Field Classification = “Senior Citizenship”

We can portray this in XMind under the Contact entity. We test for this condition by creating a record, and making the appropriate changes needed to test this business logic as shown below in XMind.

image

 

We can map out test conditions when setting changes and verifying business logic.

This is only a tool for planning and is designed to ease the planning process using a visual tool. We can use XMind to map out and log bugs but it would further add clutter into the overall mind map. It is only design to visually aid and take out mental strain for the testers but it doesn’t replace the usefulness of thorough documentation and integrated test management tools. It doesn’t provide other management functionalities such as in Team Foundation Server where we can log bugs, assigned them to a user and communicate between members of the project team effectively.

Test planning and strategy is integral part in quality assurance and integrity of software products such as Microsoft Dynamics CRM. XMind allows the tester to plan how we test software quickly and effectively as a visual tool. It offers other functionalities such as colour, markers and note taking to further inform and categories components to the user during the testing process. While it cannot replace detailed documentation reporting, it gives the tester a useful tool for test planning and strategy by grouping representations and presenting information visually.

New habits for a new job

$
0
0

Here’s my first blog entry since I joined Magnetism. I have been reading a book by Stephen Covey titled “The 7 habits of highly successful people” which I have learnt so much from.

I will share my three main takeaways:

All about the perspective

The young woman/old lady. When I first came across this picture, I did not think it is about the perspective. It is just something fun for me to look at. But in this book, it opened my eyes to see the young woman and old lady from the different images. This book really challenges me to see situations in a different light – paradigm shift. One example is my big move to Auckland. People from Wellington constantly told me how terrible the traffic is and how hostile the people are (Really? I guess they just don’t want me to leave). But after I moved here, I told them, “Auckland is fun. When you leave from a place to another, no matter what the new place is like, you will always gain new perspective because you see different things. Embrace changes as they will grow you to become a better person.” I will continue to work on my paradigm shift using the suggestions made by Stephen Covey so I can be more accepting towards various perspectives that are different to mine. There’s always than my own perspective.

First things first

Now, the time management matrix really impacted me. I am in Quadrant 1, while thinking about Quadrant 2 things. Ok, I am probably a mix of both. I love relationship building, hence I love bonding with people and I invest a lot in my friends. I think I am doing well in this aspect of Quadrant 2. But I am also a person who wants to complete everything within the shortest amount of time so that I can have more time to finish other tasks. But after reading the book, I realise I might have been in Quadrant 1, feeling that every task I am given at work is a crisis; that I have to finish them asap so that I don’t hold anyone up. Habit 3 has made me rethink my priorities. What is the most pressing thing I should be doing at work? What can I do to make myself more effective, rather than just efficient? What would make a tremendous positive difference if I changed the way I worked? As I am in the Project Assistant role now, priorities will be different compared to when I was a Personal Assistant. Now I have to relearn my priorities using Quadrant 2 when my tasks start to pile up.

Seek first to understand, then to be understood

Big chapter. I learnt that taking time to understand a friend, an employer, a colleague, a client or even a situation is definitely a valuable thing to do. In fact, they probably fall in Quadrant 2; Not urgent but bringing long term benefits. I learnt that listening to people with your heart is more effective than listening to them with your mind; trying to assess, judge or jump to conclusions. “People don’t care how much you know until they know how much you care”. So true. We can understand the situations from their perspectives, then ours, and eventually come up with a solution which benefits all. Oh, I guess that falls into Habit 4 too – think win-win. There’s always more to listening than speaking.

Hope you enjoy this entry.

Here’s some fun. Can you find the horse and the frog in this picture?

image

Customer Field in Dynamics CRM 2016 SP1

$
0
0

Customer lookup fields also work on entities enabled for the Interactive Service Hub (ISH), although there are a number of unrelated defects in ISH that may prevent you from saving records and using views.Microsoft Dynamics CRM 2016 Service Pack 1 (SP1) introduces the “Customer” field type – a new data type which gives you the ability to add a lookup field to a customizable entity which allows users to select Accounts or Contacts. Requests for this feature date back to the CRM 4.0 days, so it is nice to see that it is finally here after all these years.

image

In previous versions of CRM, Customer lookups were only available on several out of the box entities such as Case, Lead, and Opportunity (just to name a few). For custom entities, you would have to create two separate lookup fields – one to the Account and one to the Contact. I have also seen implementations where developers hacked their way to create their own multi-lookups, which of course is unsupported.

Creating a Customer lookup is as easy as creating a regular lookup, with one additional step. The steps are as follows:

1.    Navigate to Settings -> Solutions and open up your solution
2.    Expand the Entity you wish to add the Customer lookup to. In my example, I am using a custom entity called Event (schema name rosh_event).
3.    Expand Fields and then click on New
4.    Enter the details of your field, and for the Data Type select Customer
5.    Specify the names of the Account and Contact relationships

The names of the relationships aren’t immediately obvious, so a good guide is to see what name CRM suggests when creating a regular lookup. For example, if we create a regular lookup to the Account entity, CRM will suggest the name rosh_rosh_event_account. Based on the suggested name above, I would provide the following relationship names:

  • rosh_rosh_event_customer_account
  • rosh_rosh_event_customer_contact

Add the field to your form and publish customizations. When you click on the lookup, you will see that both Accounts and Contacts are available to select.

image

Things to Note

Customer lookup fields can be added to views and are sortable, filterable, and searchable using Quick Find.

You cannot set Related Record Filtering or Additional Properties at the form level like you can do with regular lookups.

The platform adds multiple fields in the background as shown in the screenshot below. The same fields are available using filtered views for reporting. The <prefix>_CustomerIdIdType field can be one of two values – “1” to represent Accounts or “2” to represent Contacts.

image

Customer lookup fields also work on entities enabled for the Interactive Service Hub (ISH), although there are a number of unrelated defects in ISH that may prevent you from saving records and using views.

New habits for a new job - part 2

$
0
0

I continue to be amazed at the habits which Stephen Covey presented in “The 7 Habits of Highly Effective People.” I find that the way I handle situations has changed. Today I will share more on how the habits have inspired me.

Proactivity

In the book, Stephen Covey shared a story of Viktor Frankl.  In summary, Viktor had traumatic experiences losing his family and he was imprisoned in the Nazi death camps. He had every reason to feel depressed, but instead he took on a proactive approach to visualise his life after his release from prison. Through this, he inspired people around him, helping them find meaning in life. This is a very powerful testimony of someone who chose his response over his circumstances. He practised freedom in his mind and eventually showed everyone that what was in him was greater than what was outside of him. If he is able to do it under such terrifying experiences, I am sure I would be able to use the same discipline to practise freedom over my situations in life.

To begin with the end in mind

This is a very interesting statement but I believe there is great truth in it. To begin with the end in mind means to start with a clear understanding of your destination. A project always has an end product to be achieved. Without the end product as the destination, the project would be meaningless. In life, we are always trying to achieve a goal e.g. get a good job, get married, be a successful business person etc. How do I want my friends and colleagues to see me when I reach the end of my life? This is a question I keep asking myself, mapping out the life that I want to fulfil and working out how I can positively impact people. I believe having the end in mind will greatly increase my capacity to cultivate good and effective habits and help me fulfil the end purpose.

Think win-win

“Win/win is a frame of mind and heart that constantly seeks mutual benefit in all human interactions.” I have always been told that win-win is the best situation and this book confirms it all. I believe this is definitely fundamental to success in all our interactions. It sounds easy to think win-win but I believe it takes effort and discipline to think in other people’s shoes. Not my solution, not their solution, but the solution that makes us both happy and satisfied.  When we are thinking win-win, we have to be sincere about it to build a trusting relationship with the person or organisation we work with. In this way, it will definitely be a win-win situation.
Synergize: Positive synergy creates energy. When people experience a moderate degree of synergy, they start to open up and explore various opportunities that thrust them to a new level. For me, the key is to accept the differences of the people around me. It is very easy to fall into the trap of producing negative energy when you do not accept someone’s differences in a positive manner and try to manipulate so that people can be on your side. But just like Stephen Covey said, valuing the difference is the essence of synergy. For me, it is always good to get a second opinion, not to take insults personally and learn to accept everyone’s unique differences. It is not only positive synergy but also a great virtue to have.

Sharpen the saw

This is my favourite chapter in the book. We can enhance the personal asset – ourselves. Stephen Covey identified this as a Quadrant 2 activity – It is important but often we neglect it. However, we are often caught up in our busy lives; going through the motions and neglecting our personal development. The late Dr. Han Selyes says that a long, healthy and happy life is the result of making contributions, having meaningful projects that are personally exciting and contribute to and bless the lives of others. I think it is time for me to expand my territories, enlarge my capacity and focus on my development so I can reap long termbenefits for myself and others.

image

Viewing all 987 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>