Tip #1248: Stop using OrganizationProxy

One of the topics discussed during the MVP Summit 2019 was the brexit of SOAP API. I thought we dealt with it already but there is an additional small but important message:

Stop using OrganizationProxy

Matt “Platform Deity” Barbour

Hold on, you may ask, didn’t you tell us that IOrganizationProxy is fine? Yes, it is, with a capital ‘I’. Interface IOrganizationProxy is fine (and recommended for use in the plugins), but class OrganizationProxy is not. Use CrmServiceClient instead, if you must.

Cover photo by unsplash-logoThomas Le

Tip #1247: Why you should rename your steps in Flow

When you start using Flow, it is tempting to just add your triggers and actions and go, but there is one small detail you don’t want to forget–rename those steps.

For those who don’t know, you can click the … on a step in Flow and select rename.

This will then let you rename the action step to something that makes more sense than “Update record 3.”

So why is that important?

  1. It will save you a lot of time later, especially if you have more than a few steps. If you see multiple actions called “condition,” you will have to click into each one to see what they do.
Renaming the steps makes managing complex Flows easier

2. It will reduce your chances of messing up later. When I insert a dynamic value into a field or expression, I’m presented with all of the field values from each of the triggers and actions before this one–so if you have multiple get contact record actions (or multiple entities with similar sounding fields, like account and contact), you will have to be sure you are picking from the correct one. If you don’t rename your steps, selecting the right one becomes exponentially harder.

The step name is included in the dynamic content selector.

3. It is considerate to those who come after you. If you are building a Flow that your company will be using for important business functions, you will likely not be the only one who ever needs to work on that Flow. By renaming your steps, you will set a good example of Flow best practices for those who work on the Flow in the future, and they will more easily be able to figure out what you did.

Bonus tip–name the steps first

You may find the “rename” option is grayed out and you cannot rename a step. The reason for this is because other steps depend on this step, and you can’t rename a step if it is referenced in a subsequent step.

Can’t rename because a subsequent action references its output

That’s why “build the Flow first then rename the steps” is a bad idea–if you get a complex inter-related Flow going, you will not be able to rename the action steps, causing you to either redo a lot of your work or give up and leave your generically named actions.

Cover photo by unsplash-logoBrett Jordan

Tip #1246: Use “Get Record” to get all the fields in Flow

TIP UPDATE–after further testing, it appears that this tip may not be necessary. Get record is helpful if you need to get additional details from a related record, but you should not have to do get record after an update trigger.

You create a Flow that runs when a record is updated. Occasionally the Flow fails on one or more step with a template error that reads something like the following:

Unable to process template language expressions for action ‘Check_if_Last_Name_contains_data’ at line ‘1’ and column ‘1823’: ‘The template language expression ‘triggerBody()[‘lastname’]’ cannot be evaluated because property ‘lastname’ doesn’t exist.

You think: of course the lastname property exists–it’s one of the standard fields and it is available to be selected from the field list.

Not so fast–take a look at your failed flow and expand out the when a record is updated. You will notice that none of the fields that do not contain data (nulls) is included in the list.

If you will be referencing fields from the updated record, insert a get record step after the when a record is updated step–then when you reference a field from the record that equals null, the Flow will succeed.

Cover photo by unsplash-logoBrian Taylor

Tip #1245: Tops and bottoms in April ’19 Release

It’s great to see the team advising us in advance about the upcoming features in the April ’19 Release Notes. As with any forward document, it is a living and breathing beast. Some features are being postponed, some replaced, new stuff added.

Some of the late-comers are new FetchXML operators. How often you wanted to send season greetings email to your best customers, or perhaps, even a gift? Where do I get 80% of my revenue from? By the same token, wouldn’t be great to know the customers you can live without – who generates large number of support calls but brings little to no revenue?

Now you can define both, top and bottom subsets of your customers with the new Top and Bottom filters in Advanced Find:

For these operators to appear, administrators need to enable the feature in admin center under Settings > Behavior:

So, once the feature enabled, how do you define the top and bottom records? That’s the best part. The settings are per user and per entity (currently accounts only) giving you full freedom to do whatever you want without affecting the others. There are plenty available options but if your choice is not there you can always opt for “Custom” and define your own FetchXML filter:

For developers: the operators extend FetchXML schema as following:

<xs:simpleType name="operator">
  <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="eq" />
    <xs:enumeration value="neq" /> 
    ...
    <xs:enumeration value="top-notch" />
    <xs:enumeration value="absolute-bottom" />
  </xs:restriction>
</xs:simpleType>

Cover photo by Banter Snaps

Tip #1244: CDS connector may not fire in administration mode

We did recommend using CDS Connector in Flow (more than once, actually) and most of the time it works great. However there have been some reports that CDS Connector does not trigger in the sandbox organizations while working fine in production. Turns out, there is a good explanation, straight from the source:

With the new CDS Connector … the events are pushed to Flow/Logic Apps by the async server. The async processing … [is] turned off for custom logic due to the organizations being in “Admin Mode.”

The source

Here we go. If CDS Connector does not fire as expected in your Flows, check if your organization is in administration mode.

Cover photo by unsplash-logoKristina Flour

Tip #1243: Forgot to turn off the Flow

Whoever decided that you shouldn’t be able to save a Flow in a solution if you haven’t turned it off first is a cruel, cruel person

Save me please

In case you haven’t head, you can add Microsoft Flow to solutions now (yay!) but if you edit a flow without first turning the Flow off, you will see the following error:

This is one of those moments where you may be tempted to utter the expletive of your choice in frustration, especially if you have made extensive change.

But fret not, all is not lost.

Simply right click on the browser tab and select “duplicate.” Then in the newly opened copy of your flow, go to the information screen, where you can turn off your Flow, then toggle back to the original tab and save your Flow.

Thanks MVP Natraj Yegnaraman for saving my Flow. Got any tips? send them to jar@crmtipoftheday.com.

Did you know that Tippy has a podcast?

You can now listen to us read and elaborate on the weekly tips of the day on the Power Platform Tip Show. Subscribe on Apple or Google podcasts, or catch us on the CRM Audio feed.

Cover photo by unsplash-logoChris Gallagher

Tip #1242: Invalid App SiteMap

After an update, you can’t get into your model driven app. The error says “Invalid App Site Map.”

To fix this, open the app in app designer.

Click the pencil to open Site Map Designer.

Make some kind of update to the SiteMap–if you don’t want to rearrange the subareas you can simply edit the name of one of the areas or groups, then change it back to what it was.

Save and publish your sitemap, then save and publish your model driven app.

Problem solved!

Cover photo by Muhammad Haikal Sjukri

Tip #1241: Unified Interface Only and Outlook Client

We have an old version of Exchange that doesn’t support the Outlook app, but we want to move to Unified Interface only in browser. Is this possible?

Old timer

As you may know, if you want to disable the classic UI for all users, you can go to “My Apps” and select the […] button and choose “Hide for all roles.”

But you may be curious how this will impact D365 for Outlook (the classic Outlook client), given that the classic client does not recognize unified interface. Will views and records continue to open?

Based on our testing, the answer is yes. After disabling the classic UI for all users, users with the Outlook client were still able to track and open records.

Note that this will require you to still test and maintain both classic and unified experiences, and it is recommended that you have a plan to move to the app for Outlook before classic UI goes goodbye.

Cover photo by Vonecia Carswell

Tip #1240: Trigger another entity’s flows

I have a flow on Account, and sometimes I want to trigger that flow to run when a related contact is updated. Given we don’t have child Flows yet, how can I make a change to one record execute a flow on a different entity?

One trick that I’ve used on workflow that is also a solution for Flow is to update one of the fields that triggers the flow on the parent record. If you don’t want to change the value of the record, you can update the field with its current value.

This will trigger the flow to be run.

Tip #1239: Can’t manage solutions

If you want to enable a standard Microsoft solution like Gamification, Voice of the Customer, or Field Service, the standard method is to go to the Dynamics 365 instance manager, select your instance, then click the Solutions button.

But what if you select your instance and do not see the solutions button? As Marius “Viking” Agur Lind told me, “click your instance again.” When you click a second time, the Solutions button will magically appear.

Got tips, send them to jar@crmtipoftheday.com.

Cover photo by unsplash-logoJørgen Håland