Tip #591: Advanced text conditions in system views

If you need to create a list of accounts with an annual revenue between 1 and 2 millions, you can quickly add two conditions in your view:
Revenue between condition
But what if you’d like to see a list of accounts with the names from A through L? There is no Greater Than clause for the text fields so what can we do except adding 10 “ORed” Begins with conditions (one per letter)?

Building advanced text conditions is not that difficult, as it turns out.

  1. Create a new system view and add Begins with condition and add [A-L] as the value. Naturally, that won’t work but save the view anyway.
  2. Create new solution, add account entity and, if you happen to use CRM 2016, select only that view.
  3. Export the solution, extract customizations.xml file and open in your favorite XML editor.
  4. Find fetchxml for the view and locate the clause you entered. It will look like
    <condition value="[[]A-L]%" 
        attribute="name" operator="like" />
    

    As you can see, CRM escaped the square bracket so that SQL Server treats it as a square bracket and not a wildcard character set. Let’s fix that.

  5. Replace the value with [A-L]% and save the file
    <condition value="[A-L]%" 
        attribute="name" operator="like" />
    
  6. Replace customizations.xml in your solution zip file and import that solution back.

Why would you want to do it? How about the list of accounts where name starts with non-alphanumeric? Change condition to “[^A-Z0-9]%”. How about accounts where 3rd letter is ‘S’? “__s%” will do it for you. In fact, as you guessed it, any wildcard SQL operator should work.

Note: modifying fetchxml is supported but you no longer will be able to edit this view in the browser. It’s also too easy to get it wrong so, if in doubt, test your fetch using FetchXml Tester tool from XrmToolbox.

Tip #590: The list has not finished loading

In a recent deployment of CRM 2016 on premises, users started seeing an error message when setting regarding in the CRM Outlook client: The list has not finished opening. Try your request again.

 

All Binoogle searches found were forum posts saying that it had been fixed in CRM 2011 Update Rollup 10. This made me start wondering if Groundhog Day came a little bit late this year.

The cause of the issue turned out to be internet security software. As is a best practice, we had added CRM internal and external URL’s to the McAffee Internet Security script scanning exclusion list, but McAffee was still interfering with CRM script execution. The answer was to add a trailing slash (/) to the end of the URL’s, and that fixed the issue.

So instead of https://internalcrm.yourdomain.com, use https://internalcrm.yourdomain.com/.

Filed under #don’taskmewhy.

Tip #589: Programmatically Move Cross Entity Business Process Flow Stages in CRM 2016

It’s been a while since we’ve heard from Gayan “Not Daddy” Perera. As often the case with Gayan’s tips, this one is a nugget.

Moving the stage of a cross entity business process flow programmatically can be achieved by using the NavigateToNextEntity request. Most of the parameters are self explanatory, the only tricky one is the NewTraversedPath parameter (New! I knew it! We blogged about TraversedPath before and it did look promising – t.j.). This is a string value containing the previous stage id and the next stage id combined together with a comma.

Here is an example. Let’s say we have a case, the next step is to review the case email which will refer to the latest email from the customer. What we’re wanting to achieve is to automatically set this stage along with the email record reference so the user doesn’t need to click Next and then to select the Email record; eliminating two additional clicks.

OrganizationRequest or = 
   new OrganizationRequest("NavigateToNextEntity");
or.Parameters.Add("ProcessId", 
   new Guid("guid of the business process flow"));

or.Parameters.Add("NewActiveStageId", 
   new Guid("guid of the next stage"));
or.Parameters.Add("CurrentEntityLogicalName", 
   "incident");
or.Parameters.Add("CurrentEntityId", 
   new Guid("{guid of the case}"));

or.Parameters.Add("NextEntityLogicalName", 
   "email");
or.Parameters.Add("NextEntityId", 
   new Guid("{guid of the email}"));
            
or.Parameters.Add("NewTraversedPath", 
   "previous stage guid,next stage guid");

var response = sdk.Execute(or) as OrganizationResponse;

Read more at the source.

Tip #588: CRM for Outlook Configuration Diagnostic

Here is the link to the updated CRM Online Outlook Client diagnostic wizard. The wizard has been updated to include recently discovered issues.

The older troubleshooting wizard for both online and onpremise was here https://support.microsoft.com/en-us/gwt/10070 But it hasn’t been updated in a while. So if you are using CRM Online be sure to use the updated wizard link above.

Also take note that starting with the CRM 2015 Outlook Client, a dynamic help feature was added. Now depending on the error you receive you will be directed to a KB article for that specific error rather than a generic help page. The new CRM app for Outlook also includes that feature.

Read more about it here:

http://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2015/06/02/dynamics-crm-dynamic-help

Tip #587: Tipster guide to creating Dynamics CRM Package Deployer package

PopcornVideo Friday’s here, get the popcorn. In this video we show you how to create Dynamics CRM Package Deployer package using Visual Studio. Additional Information on creating a package can be found here.

YouTube player

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 #586: Accessing CRM mobile signatures in Dynamics CRM

Raphael Moser sent the following tip to jar@crmtipoftheday.com (and you can do too!)

This recent blog post shows how to use the new new signature control feature on mobile apps:

http://www.dynamicscrmpros.com/microsoft-dynamics-crm-2016-new-signature-control-feature-phones-tablets/

The problem is only that you can’t show the created signature directly in crm web.

The signature is saved as a data URI (someting like “data:image/png;base64,iVBOR…”) and can thus be displayed quite easily. You get the data either via hidden field on the form or via WebApi and then inject the data into a picture html element.

Small example using the field on the form. Create and insert a new HTML Webresource on the form:

<html>
<head>
<body style="word-wrap: break-word;">
<script type="text/javascript">
var image = new Image();
image.src = window.parent.Xrm.Page
  .getAttribute("new_signature").getValue();
document.body.appendChild(image);
</script>
</body>
</html>

And voila…:
signature

 

Tip #585: Why can’t I export notes to Excel

So you do an advanced find for note records that you want to export to Excel. You expect to see the normal Export to Excel button that appears in every other Advanced Find view.

Exportaccounts

However, you see that that half of the ribbon is missing when searching for notes.
export2

The answer is it is there, it is just in a different place. It actually is the same place it has always been on notes Advanced Find views (at least since CRM 3.0).
Export3

Tip #584: Talk and use CRM at the same time

This tip is for Verizon customers who use iPhones in North America. If you have an iPhone 6/6Plus/6S, you most likely are used to not being able to connect to apps like Dynamics CRM mobile while talking on the phone. However, what you may not know is there is actually a setting to enable voLTE (Voice Over LTE). this setting will not only give you higher voice quality on calls, it will also enable you to use LTE data while talking on the phone. Now I don’t have to worry about getting lost on Waze when Scott Sewell calls me.

To change the setting, in iOS go settings–>Cellular and change LTE to voice & data.

Voice & Data

 

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