Tip #1218: Suppress headers and footers in portals

Dynamics 365 Portals, based on Bootstrap, are very flexible when it comes to the web site and individual page layout. To create consistent look and feel the Website record defines header and footer templates.

image

And the footer looks like this:

image

I was working on a site where I didn’t need a footer at all so I cleared Footer Template field. And I got this:

SNAGHTML1daeb057

What the?!

Yes, folks, a default template is rendered, whatever that is. To suppress header and/or footer, create a blank Web Template, something like

{% comment %}
  This template has been deliberately left blank
{% endcomment %}

and select that template on your Website record. The results are stunning. I don’t even have a screenshot because it’s, well, blank.

Note: if you disable header, it’ll be up to you to render the search box, sign-in/out control, and a language selector elsewhere, because that’s what the default header renders.

(Cover photo by Jeffrey Lin on Unsplash)

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)