Tip #1300: CDS vs Dynamics 365 instances

Dynamics 365 Apps are built on top of Common Data Service

Citizenship in IT, 2019 edition

If that’s the case, we should be able to install/uninstall Dynamics 365 Customer Engagement Apps at will, right? Yes. In theory. In the future. Decoupling Dynamics 365 CE from the underlying platform is a long and painful process.

Our special UK correspondent Mohamed Mostafa reports. (Would you like to be our special correspondent yourself? Send the tip(s) to jar@crmtipoftheday.com.)

With many new customers adopting PowerApps, they are building instances (environments) of type CDS Only and building Apps on these new instances. Although, CDS only instances do look almost the same as a new Dynamics 365 instance, they are indeed different. As it stands, you cannot currently install a Dynamics 365 1st Party app (for example Field Services) on a CDS only instance. Additionally, there is no way currently to upgrade a CDS instance directly to be a Dynamics 365 instance.

Take this example scenario: A “Lead Capture” PowerApp created on a CDS only environment gets widely adopted by an organisation and it becomes essential to add more built-in features and functionality from the Dynamics 365 Sales App and the Dynamics 365 Sales AI (Sales Insights) App. At the moment, adding these Dynamics 365 Apps to a CDS only instance is not possible. A direct upgrade of this CDS only environment to be a Dynamics 365 instance is also not possible. The only solution in this case is to migrate the CDS instance with all its data, configurations and Apps to a new Dynamics 365 instance. This now becomes a migration project not just a simple upgrade.

Hence, it is essential for any individual or team looking to build a new PowerApp to consider the future of this App. If the use of Dynamics 365 1st Party Apps is expected, then they should build this PowerApp on a Dynamics 365 instance not on a CDS only instance.

Cover photo by unsplash-logoRaquel Martínez

Tip #1299: Split email personalities

In the world of the email router, incoming and outgoing profiles were separate, so one user or queue could have separate email servers. Let’s say you wanted incoming email to come from exchange, but you wanted to send outgoing email via SMTP, you could do it.

With the deprecation of the email router, the only option is server-side sync. With server-side sync, the incoming and outgoing email settings are on the mailbox record, and there is only one mailbox per user or queue.

So what to do if you want email to come in via Exchange and go out via SMTP or or some other connection?

MVP Gustaf Westerlund makes a strong case for using forward mailbox for this scenario. With forward mailboxes you can split the channels.

One additional approach is set up two different queues and associate the email address with both queues. the “in” queue is only set up for server-side sync for incoming email and associated with an email server profile for your exchange server. The “out” queue is set only set up for server-side sync for outgoing and associated with an email server profile for your SMTP server.

When an email comes in, it may still go to the “out” queue, since it matches by email address. To prevent this, simply create a real time workflow that creates a queue item when an item is added for the “out” queue, adding the item to the “in” queue. This will make any items added to the “out” queue get moved to the “in queue.

Then, when you send your responses to items in the “in” queue, select the “out” queue as the “from.”

If it confuses users to see two queues, only give them access to the in queue and use a real time workflow to change the “from” on emails sent from the “in” queue to the “out” queue.

Cover photo by unsplash-logoLinh Pham

Tip #1298: Quickest way to filter views and forms in an app

Today’s tip from Linda Connolly – thanks! You can send your tip to jar@crmtipoftheday.com too!

I spotted this one when doing some work earlier in the week. 

If you’re building a business unit specific solution for a customer and want to quickly and easily only show them the views/forms designed for them, add the Site Map to your solution and then create a new model driven app from within the solution. It will automatically filter down the views and forms to what has been included in the solution file and add the sitemap.

Any entities not included in the solution will have all forms/views added automatically. From there you just need to edit your sitemap, if required, and check to make sure you’ve included your quick create/advanced find views on the included entities but you have a customised model driven app without the need to pick 5 views from a list of 20.

Cover photo by Sharon McCutcheon from Pexels

Tip #1297: Base your base role on the CDS User role

The very first tip of the day I wrote was Tip 2: Use a Base Security Role. The point of this tip is don’t jam every permission needed by each group into each role–use a common role that includes the minimal permissions needed to log into the application for all users, then create smaller roles for each group with only their unique permissions.

In the past I recommended starting with the salesperson role, pretty much the standard role with the lowest permissions, as the basis for the base role–copy the role and then add the permissions needed by all users.

With the move to the common data service and PowerApps, Microsoft has added a new standard role: Common Data Service User. This role includes permission needed to log into a model-driven app and access the common data service, including user level permissions for accounts, contacts, activities, but no Dynamics 365 restricted entity access and no sales or opportunity entities.

This makes the CDS User Role an ideal role upon which to base your base role. It includes everything users need to access the common data service without including any permissions for sales or customer service entities.

Cover image by Rene Asmussen from Pexels

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