Tip #1216: New form designer preview is now available in North America

At the end of 2018, Microsoft announced a preview of the new WYSIWYG form designer. This new maker experience looks like the Unified Interface, making form configuration look and feel like it does to end users.

Unfortunately for those of us in North America, the preview was not available in our environments. Now it is.

To try the new form designer preview, go to powerapps.com.

  1. Verify that you are in the right environment.
  2. Click data
  3. Select the desired entity
  4. Click the forms tab
  5. Click the (…) next to the form name
  6. Select “Edit Form (Preview)”

You can now enjoy the new form designer experience.

(Cover Photo by rawpixel on Unsplash )

Tip #1215: Automatically manage folder tracking

Public service announcement: we are back from the Merry Year hiatus and straight to tipping.

Tracking folders is a cool feature where you can configure an Exchange folder to be a tracked folder and optionally link it to a Dynamics 365 record so that any email landing in that folder will be automatically tracked and Regarding will be set to that record.

This is great if I want to follow specific records, for example, a large opportunity.

image

Create a subfolder in the Inbox

SNAGHTMLb783c16

Open Personal Options > Email tab > Configure Folders Tracking Rules

image

So now I would shove any correspondence that may be related into that folder and let the system do the work.

This is all nice and emails are, indeed, tracked. But what happens when the opportunity is closed? Well, nothing. Wouldn’t it be nice if we can “untrack” the folder? If for nothing else then for the 25 tracked folders limit – I want to have some space for the new opportunities (and no, I didn’t win the one above).

Enter Flow. Why not workflow? Because Flow has two distinctive advantages:

  1. It can actually delete records
  2. It can access tracking folders configuration records  – Mailbox Auto Tracking Folders (mailboxtrackingfolders) entity

The flow logic is as following. Just one screenshot, people, as it fits on one screen!

image

  1. Trigger on when opportunity record Updated, filter on statecode. Technically, should add an extra step validating that opportunity has been indeed closed.
  2. Get all mailbox tracking folders where Regarding is equal to that opportunity. Folder tracking is a per-user feature so multiple users can be tracking the same opportunity.
  3. Loop through returned records and nuke them.

Tested and tracked folder is as good as gone!

Wouldn’t it be nice if we could also create tracking folder configuration if certain conditions are met, like opportunity value > $1,000,000? Unfortunately, configuring tracking folder requires knowledge of Exchange folder id and I’m yet to figure out how to find that easily. Drop me a line if you figured that out!

(Cover photo by Omid Kashmari on Unsplash)

Tip #1214: Add “what’s new” to unified interface

We use activity feeds and the “what’s new” dashboard in D365 classic UI to see a feed of posts in the system. This doesn’t show up in unified interface–how can we use the activity feed wall in unified interface?

Keep me posted

Dear posted,

The activity feed wall is replaced in unified interface by the timeline control. On a dashboard (like the Sales Activity Social Dashboard) add the timeline control. If you want it to only display posts and not other types of activities, change show these modules to “show selected” and select “Posts”.

You will now see the activity feed wall on your dashboard.

(Cover photo by Waldemar Brandt on Unsplash)

Tip #1213: When you pushed that button simplified

In tip #1213 we walked you through a long winded way finding out where and when the Flow button was pushed. It involved using lattitude and longitude of the user’s location and calling Bing Maps API.

As it turns out, if you are only after the local time, there is a much simpler method. When a flow is invoked using manual button, trigger tokens contain, among other values, local date and time at the location where the button was invoked. These values are accessible using the following expressions:

  • Date as triggerBody()['key-button-date']
  • Timestamp as triggerBody()['key-button-timestamp']

The entire brouhaha can now be reduced to:

Flow telling the local time

The only gotcha is that the property key-button-timestamp does not exist when the flow is run from the browser, it is only available on a mobile device. When testing, do at least a single run using a mobile device and then re-use this test run data in subsequent testing.

(Cover photo by Luke Chesser on Unsplash)

Tip #1212: Where are my apps?

I attended your webinar about model driven apps.
Our sandbox has been upgraded to V 9.1 and our production environment will be upgraded tomorrow.  In preparation for this, I have created and published an app .  I have added the appropriate security roles to the app, but it is still not showing up for selection for them on their mobile app. It says “we can’t find any apps for your role. To check for recently added apps, select refresh.”

Laura M

When Microsoft releases new versions of Dynamics 365, sometimes they introduce new security role permissions. If you are using custom security roles created prior to version 8.2, they likely do not have the required permission to see model driven apps.

Update the users’ security roles, ensuring that they have read privilege for model driven apps on the security role Customization tab. 

(Cover photo by Daniel Jensen on Unsplash)

Tip #1211: Mixing entities to build complex views

The trick to get developers to get your job done for free is to challenge them. Which is exactly what Steve “Mr SMB” Mordue has done.

Challenge

I am trying to create a view of activities, that will show all activities performed by anyone on my team. I know I can create specific view that filters that way, but I don’t want to create one for each of the 9 teams. I want to recognize the team I am on and show it.

Accepted

A bunch of linked entities later, Andrii “Granny’s Moonshine” Butenko had a solution:

image

And that would have been the end of it but then the discussion went something like this:

– I need me, my team, and all members of that team

– So records can belong to Team as well?

– Yes

– Aah, crap

So the challenge now was to combine the expression above with the condition “Owner Equals Current User’s Team” using OR operator. Except that visual view builder would have none of it. At some point Jonas “FXB” Rapp was summoned and solved the problem between brushing his incisors and molars. Readers digest:

  1. Build a view with the columns that you need and the condition above.
  2. Fire up XrmToolBox, load that view into View Designer then start editing query in FetchXML Builder.
  3. Mix conditions on attributes from different entities in the builder.
  4. Test your fetchxml then update your view.
  5. Done! (Note: the view will work but you won’t be able to edit that view in Advanced Find).

Winning FetchXML:

<fetch mapping="logical" output-format="xml-platform" 
        version="1.0" distinct="true" >
  <entity name="activitypointer" >
    <attribute name="activitytypecode" />
    <attribute name="subject" />
    <attribute name="statecode" />
    <attribute name="prioritycode" />
    <attribute name="modifiedon" />
    <attribute name="activityid" />
    <attribute name="instancetypecode" />
    <attribute name="community" />
    <attribute name="ownerid" />
    <attribute name="owneridname" />
    <filter type="or" >
      <condition attribute="ownerid" 
                 operator="eq-useroruserteams" />
      <condition attribute="systemuserid" 
                 entityname="tm" 
                 operator="eq-useroruserteams" />
    </filter>
    <link-entity name="systemuser" to="owninguser" 
              from="systemuserid" link-type="outer" >
      <link-entity name="teammembership" 
                 to="systemuserid" from="systemuserid" 
                 link-type="outer" >
        <link-entity name="team" 
                   to="teamid" from="teamid" 
                   link-type="outer" >
          <link-entity name="teammembership" 
                       to="teamid" from="teamid" 
                       alias="tm" link-type="outer" />
        </link-entity>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

I was dead last in this contest – my own version wouldn’t even work. As it turns out, link-type="outer" is important, don’t leave home without it.

(Cover photo by Bernard Tuck on Unsplash)

Tip #1210: Getting to settings from unified interface

One objection to switching to the unified interface is that some users need to access functionality in the settings area (create workflows, manage users, system settings) and we want to have a consistent user experience for all users.

With recent updates to the unified interface, you can now easily get to the settings area from any unified interface model-driven app.

In the upper right, click the options gear and select “advanced settings”

This will take you to the settings area of Dynamics in the classic UI in a separate browser tab. Note this is only the settings area.

With this hybrid approach, all users can leverage the unified interface while still making it easy for administrators to administer and configure the system, and removing yet another reason not to use the unified interface.

(Cover photo by rawpixel on Unsplash)

Tip #1209: Embedding canvas apps in model-driven forms

For those of us who were continuosly torn between canvas apps (on yer device, pixel-perfect, task-oriented) and model-driven apps (a.k.a. good ol’ forms, views, you know, all that Dynamics 365/CRM stuff), the wait is finally over. Embedding canvas apps in model-driven forms is now available as Public preview. First, the official part.

Makers can now extend the power of WYSIWYG, low-code customization, offered by canvas apps, to model-driven forms. Using embedded canvas apps makers can easily design and create rich visual areas on model-driven forms. They can also connect and display data from over 200+ data sources in embedded canvas apps right next to data from the Common Data Service. The embedded canvas apps also provide rich data integration capabilities to bring in contextual data from the host model-driven form to the embedded canvas app unlocking a variety of scenarios.

The feature is now available in initial regions (Canada, India, Japan and South America). You can create an environment in one of these regions if you want to try the feature right away. The feature will roll out to other regions over the next few weeks and will reach North America and Europe by early January 2019 due to extended holiday deployments chedules.

A huge thanks to you for your valuable time and feedback when the feature was being designed and developed. Please help Microsoft increase the awareness of this feature by blogging, tweeting, talking, shouting out from rooftops 😊.

Links to some resources

Unofficial blurb

It’s great to witness this feature finally seeing the light of the day. The number one ask on my list is bidirectional communications. While it is possible to pass the context to the canvas app to do its thing like visualizations, it’s not yet possible to communicate back to the form even in the simplest form like “hey, I’m done, these are the changed pieces, refresh yourself”. Adding that would make me to revisit all implementations that use HTML web resources.

On a plus side, the release is a huge milestone, congratulations to the team. At very least the feature is there, even in a bit rough form, even with some inconsistencies and probably bugs. But it’s there. Which is more than we can say about, for example, PowerApps Control Framework (where’s “disappointed” emoji when you need one?) 

(Cover photo by Jessica Ruscello on Unsplash)

Tip #1208: More entities now work from Unified Interface

Until recently the list of entities that didn’t work on unified interface included goals, connections, campaigns, and marketing lists. With recent updates, these entities can now be accessed from unified interface model driven apps.

This is great news if you use one of these entities–I’m especially excited about marketing lists, as there are many great alternate uses for lists.

With this update, unified interface and classic UI are now almost at full parity, so there should be no practical limitation holding you back from making the switch.

Tip #1207: Check applied entity permissions in portals

Liquid is a great templating language adding flexibility to your Dynamics 365 Portal templates. However, as any abstraction, it hides some of the things happening under the hood, including some security filtering. Consider this fragment running on authenticated page:

{% fetchxml my_contacts %}
<fetch mapping="logical" version="1.0" 
       returntotalrecordcount="true">
  <entity name="contact">
    <attribute name="firstname"></attribute>
    <attribute name="lastname"></attribute>
    <attribute name="contactid"></attribute>
    <order descending="false" attribute="lastname">
    </order>
  </entity>
</fetch>
{% endfetchxml %}

<h2>Record count: 
  {{ my_contacts.results.total_record_count }}
</h2>

And… the count is 2 while expected to be the total number of contacts in this sample environment (around 20 or so) . Er?

This is because the portal engine applies entity permissions to all constructs retrieving the data including fetchxml. To see where did the things go wrong (or right – depending whether it’s your point of view or of your system administrator), use xml property of the fetchxml object. That will tell you what’s actually being executed.

<div style="white-space: pre-wrap;">
  <code>
    {{ my_contacts.xml | escape }}
  </code>
</div>

In my case resulting fetchxml looks like this

<fetch mapping="logical" version="1.0" 
  distinct="true" returntotalrecordcount="true">
  <entity name="contact">
    <attribute name="firstname" />
    <attribute name="lastname" />
    <attribute name="contactid" />
    <order attribute="lastname" descending="false" />
    <filter type="and">
      <filter type="or" hint="union">
        <condition attribute="parentcustomerid" 
        operator="eq" 
        value="deadbeef-38c9-e711-a844-000d3ad1181d" />
        <condition attribute="contactid" 
        operator="eq" 
        value="deadbeef-38c9-e711-a844-000d3ad1181d" />
      </filter>
    </filter>
  </entity>
</fetch>

highlighted lines (injected by the portal engine) explain why I’m seeing only two records (my portal is based on Customer Service):

  • deadbeef-38c9-e711-a844-000d3ad1181d is my contact id (after I logged in)
  • condition on contactid is a result of the “self” OOB Customer Service – Contact of the User entity permission that gives portal users permissions to access their own profile
  • condition on parentcustomerid is a result of the OOB Customer Service – Contact of the Contact entity permission giving portal users access to the contacts where they are the parent customer