Tip #583: Why don’t I get all of my characters?

A client was recently testing some customization changes, and they determined that the long text field would only hold 3,969 character. They created a block of text in Microsoft Word, counted the characters, and found that the long text field would not contain it all.

The reason was that the text included carriage returns. Keep in mind that when you enter data in a multi-line text field, each carriage return also counts as characters, in most cases it is two ASCII characters – CR (Carriage Return) & LF (Line Feed).

Tip #582: Tipster guide to Dynamics CRM Configuration Migration Tool

TGI FridayIn this video we explore how to use the Configuration Migration tool to create schema files that can be used to export CRM data.
Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

YouTube player

Tip #581: Manually trigger mailbox synchronization

When you use Outlook Client synchronization, there is a button in Microsoft Dynamics CRM for Outlook that will force the synchronization to happen. If you use server-side synchronization, this button will no longer be available to you.

For CRM On-Premises users, you will find SyncDiagnosticTool.exe in the Microsoft Dynamics CRM\Server\bin folder. Run this tool from command prompt, specifying the GUID of the organization and the GUID of the mailbox.

syncdiagnostictool

Tip #579: Prioritize your relationships

When creating new relationships, change the Display Order property from the default 10,000 to a higher value, e.g. 20,000.
DIsplay Order for relationship
Sooner or later business users will ask to prioritize the order in which related entities appear and if by that time you have created 42 relationship with the default order 10,000, reordering them will be a tedious exercise.

Tip #578: No privacy in Interactive Service Hub

When trying to access Interactive Service Hub you may receive “Sorry, something went wrong while initializing the app” error:
Interactive Service Hub error
It’s caused by in-private mode in the browser (which is a standard approach to work with multiple CRM environments). Good news is that it’s a known issue and the fix is in a pipeline. Until then just stop being so secretive and use “normal” browsing mode and multiple browsers to get to the different orgs.

Tip #577: Tipster guide to Dynamics CRM Hierarchical Visualizations

¡Hola! Es viernes, mis amigos and that means tacos and another video.

Hierarchical Visualizations provide a great way to work with hierarchical data in Dynamics CRM both on system and custom entities. In this video we show you how to define a hierarchical relationship, configure the settings, and consume them in CRM.

YouTube player

Don’t forget the oil change if you upgraded to 2015.

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

Tip #576: Business Process Flow can be updated on closed opportunity

Mini Truckstop

Dynamics CRM TipperEverybody knows who Tanguy “The XRM Toolbox” Touzard is. That’s right, a legend. But being a CRM legend does not mean knowing everything – it’s knowing when to ask the right questions.

Question

For one of my customers, it seems that when you are on a won Opportunity form, you can change BPF stage, whereas the opportunity is read only

Is this a known bug?

Answer

The answer comes from the authoritative source who shall remain anonymous:

This is by design and following is the rationale.

Business processes are across entities and hence can be updated irrespective of the participating entity’s record state.

For example, Lead – Opportunity – Quote process might have 2 stages for each entity and user can decide to close the opportunity at stage 1 itself. Now if system locks the process on closed opportunity stage 1 – it can never be moved to the quote stage.

Note that the entity fields present on the process stage are LOCKED for modification if the record is read only. This effectively means that the process can be update but the record cannot. Also for the closed records, processes are not assigned automatically.

Tip #575: Check your clocks

tl;dr

Don't look at our crotches while we synchronize our watches!If you receive an error “An error occurred when verifying security for the message” when connecting to Dynamics CRM, verify that the clocks on the client and the servers are no further than 5 minutes apart.

Just a bit longer

Code that was working yesterday refuses to run and spits an error on the very first message sent to CRM:
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
The clue is, in fact, in the inner message:
An error occurred when verifying security for the message.
Quick search reveals that I’m not the only one, and it’s been dealt with before by analyzing server logs (not available, of course, for CRM Online but on-premises it’s a good option). Step by step troubleshooting instructions are in the knowledge base article that deals with Outlook connectivity issues (the root cause is the same).

Worth noting that the lines:

CrmConnection con = new CrmConnection("connstring");
OrganizationService svc = new OrganizationService(con);

do not mean “connecting to CRM”. Connection will not be authenticated until the first use. That’s why, where applicable, I tend to write:

CrmConnection con = new CrmConnection("connstring");
OrganizationService svc = new OrganizationService(con);
svc.Execute<WhoAmIResponse>(new WhoAmIRequest());

that way, if it fails, it’ll be very early in the execution.

Tip #574: Hidden sources of javascript errors

Quite often developers complain about getting javascript errors when the form does not contain any scripts or events. Explicit script definitions are not the only source of the possible errors:

  • Business Rules are deployed on the client as generated javascript. While it’s unlikely that business rules will generate an erroneous script, it’s worthwhile disabling the rules and see if the problem goes away. For CRM Online you can check the scripts generated using Business Rules Viewer at http://xrm.tools.
  • If the form contains html web resources, those resources can load scripts that interact with the form:

    An HTML web resource may interact with the Xrm.Page or Xrm.Utility objects within the form

  • Application and entities ribbons can load javascript resources as part of the action definition. You can check the presence of the commands by inspecting the ribbons using Ribbon Workbench. Note: if you entity does not have any ribbon definitions, it’s not a get our of jail free card. Third-party managed solutions can add their own command definitions to the ribbons and they won’t appear as part of your entity customizations. Hunting down those is a hit and miss exercise, vendor documentation and visual inspection of the ribbons and comparing them with the default ones is a good start.

Did we miss anything? Tell us at jar@crmtipoftheday.com.