Tip #1296: Quoting for developers

If you think this tip is great, I’ll take it as a compliment. If you think it’s lame, Joel is the one to blame because he was the one who convinced me to publish it.

I like smart quotes (in Word and in Outlook). They make your text look “smart” without too much effort. On the other hand, they are pain in the neck when you need to insert a piece of code that contains single or double quotes. Smart quotes ain’t so when copied and pasted into a code editor.

This is what I do when I use Word/Outlook and want to make my code reusable: I type the quote and then immediately press Ctrl-Z. That “undoes” just the last operation which happened to be the conversion of a quote to a smart one. Problem solved.

Cover photo by unsplash-logoFlorian Klauer

Tip #1295: Quickly search for multiple records in advanced find

If you want to quickly find multiple records in advanced find, you can type in semicolon-separated text values into your filter.

This can be a huge time saver, as you can copy/paste the string in, and assuming they are legitimate records, each value will resolve.

This is also helpful for testing a set of records after a data update.

Note — there is a limit to the number of values you can enter. Based on testing, it is somewhere around 65.

Thanks to Edgar Chan for this tip. Got any tips? Send them to jar@crmtipoftheday.com.

Tip #1294: Export solution before running solution checker

tl;dr

If you are getting “Couldn’t Complete” message from the solution checker, verify you can export the solution before running the solution checker. That way you’ll be able to see what’s wrong instead of an unhelpful “couldn’t complete” message.

Today’s tip is from Andrew Wolfe. Got a tip? Send it to jar@crmtipoftheday.com.

Tip

I created a solution recently in a test system and ran the solution checker but I constantly got a “Couldn’t Complete” message.  I logged this with Microsoft who, as ever, needed to see me run the checker and see the message before they’d look for what was wrong.  The answer from Microsoft in the logs was:

Microsoft.Crm.CrmException: Failed to export Business Process "Compliments Process" because solution does not include corresponding Business Process entity "aaw_complimentsprocess". If this is a newly created Business Process in Draft state, activate it once to generate the Business Process entity and include it in the solution.

So I tried exporting the solution as unmanaged and got the same error message as Microsoft had found.  My BPF was published but I used “Add Required Components” to add the associated entity.  I then tested that I could export the solution, this time it worked and then the solution checker could also complete and give me a set of results. So check you can export a solution before you run solution checker as that way you’ll be able to see what’s wrong rather than a just couldn’t complete message.

Tip #1293: Make case customer a contact

If you use automatic record creation and update rules in Dynamics 365/CDS to create cases automatically from emails, you should know the default behavior is to set the Customer field on the case to the parent company of the email sender and set the contact field to the email sender.

This is great for many companies, but in some cases, you want the customer to be set to the sender of the email, such as when service is provided to individuals, not their company/employer.

If you want to change the default behavior, when you create the record creation and update details, on the case form you will notice that the customer field is mapped to {null(Channel Properties)}

Remove the field mapping and using the form assistant, set the value of the customer field to the sender of the email.

Thanks Brandi Bozek for the tip. Got a tip? Send it to jar@crmtipoftheday.com.

Cover photo by unsplash-logoRoman Arkhipov

Tip #1292: Use the Route Case field

In customer service deployments, you can wind up with a bunch of different business processes. Sometimes these processes can conflict. For example:

  • Workflows and flows to route cases created through the user interface
  • Routing rules to automatically route cases created by workflows and auto create rules
  • Auto record creation rules to create cases from emails or other records.

If you don’t design carefully, you can create a process explosion, where multiple redundant processes are acting on the same record, and in some cases fighting each other (such as workflows that move manually created cases to queues running on automatically created cases and conflicting with routing rules).

To help avoid any unintentional process interactions, Microsoft provides a little known field called Route Case. This two option field is automatically set to yes when a case is routed to a queue via a workflow, case, or routing rule.

When you build your flows or workflows to route cases to queues, set a condition that routecase does not equal yes/1. Then your workflow will only route cases that have not been automatically routed.

Note this field is not available via advanced find, but you can see it via FetchXmlBuilder and it is available for workflow check conditions.

Thanks to Paul Way for reminding me of this field.

Tip #1291: Do NOT create Flows

I am slowly dragging myself back to reality and going through the backlog of the tips submitted by our readers after an insane family holiday… (You can drop your tip into jar@crmtipoftheday.com. I can’t guarantee that we will publish the tip but I can promise that if we don’t, I will write to you personally explaining why the tip didn’t make it.)

But enough of that. Today’s tip is from Shidin “D365fanboi” Haridas.

Tip

Ok, now that I have your attention, let me complete the sentence.

Do NOT create flows unless you are creating it from a CDS solution.

Why??! Because such flows are ‘solution-enabled’ and can be exported and imported during the solution deployment process and hence, better ALM procedures. Woohooo!!!!

Link to documentation: https://flow.microsoft.com/en-us/blog/solutions-in-microsoft-flow/

Screenshot of a Power Maker environment illustrating how to invoke a menu to add a Flow to the solution

Ok, now what to do with the 50+ flows you have already created in your environment?

Don’t worry, here is an easy way to clone your existing flow into a ‘solution-enabled’ flow, courtesy the great Natraj Yegnaraman.

Tîpp Jäår $0.02 + tax

That tip is a good advice if your flow is a part of a PowerApp that includes Common Data Service (CDS). Think of a flow that is, to an extent, a replacement for the legacy workflow.

Besides Flow becoming part of ALM and other mentioned goodness, there is an additional reason to make flow a part of your CDS solution. When you do so, you will have access to Common Data Service (current environment) connector. Why is it cool? Because you will no longer have to deal with reconnecting your flow after the deployment – it will just inherit the current CDS environment the container solution is being deployed into. There is some other goodness in this connector like combined trigger. Plus it’s faster.

Official documentation is now available.

Cover photo by unsplash-logoNicolas Desmangles

Tip #1290: Configure the opportunity close form

In Dynamics 365 2019 wave 2, you can now customize the opportunity close dialog. You can now turn on wave 2 at the Power Platform Admin Center.

Once you have wave 2, the first thing you need to do is enable the setting on the sales tab of System Settings.

Once this option is set, the quick create form of the Opportunity Close entity will be shown to users instead of the dialog. You can configure this quick create form like any other form in the CDS.

bye bye competitor field

Keep in mind that if you are using a model-driven app (and if you are using unified interface, you are), you need to add the opportunity close entity and the quick create form to your model-driven app. Otherwise you will still see the old dialog.

Tip #1289: Restore, don’t recreate

Today’s tip is straight from Microsoft’s own Ben Vollmer. Have a tip? Send it to jar@crmtipoftheday.com.

Right before you go live in a production environment, some partners reset an instance and then layer their solutions on top of the newly created instance. And the version numbers of solutions as well as the actual solutions installed may differ from the instance before the reset.

Why? Every time you reset an instance, the Dynamics 365 service treats the instance like a brand new instance, which it is.

If you have a instance that you want to maintain all of the exact same solution versions and not have new solutions added to it like would happen for a new customer, you should backup the instance and then copy it. Doing that the Dynamics 365 Service Engineering team doesn’t treat your instance like a brand new one.

More data on Reset and Copy is available on the Microsoft Docs Site.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/manage-sandbox-instances

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/copy-instance

Cover photo by unsplash-logoMarkus Spiske

Tip #1288: SLA’s and solutions

From the short and sweet department: If you have SLA’s in your solution and the SLA’s exist in the target environment to which you are importing your solution, the SLA’s will be deactivated after you import the solution.

If you activate SLA’s via the user interface, your only option is to activate them one at a time.

Lesson learned — avoid reimporting SLA’s unless they have changed. Consider putting SLA’s in their own solution.

Cover photo by unsplash-logoKate Townsend

Tip #1287: Transition to Unified Interface. Now.

THE SITUATION
The Web Client is likely to be deprecated by October 2019 with a view to be discontinued a year later

Dynamics 365 Unified Interface Playbook

In the immortal words of Jules:

Oh, I’m sorry, did I break your concentration?

Yes, the legacy Web Client is going away. Want to know more? Head off to Unified Interface Community and read excellent Unified Interface Playbook, Transition Whitepaper, and all other goodness.

You’ve been warned.