web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / crmlogs / Dynamics 365 CE: Filter Tim...

Dynamics 365 CE: Filter Timeline Records in a Dashboard

Wahaj Rashid Profile Picture Wahaj Rashid 11,321

Recently, I wrote a post Dynamics 365 CE: Filter Timeline Records by Default which explains how we can configure the Timeline control to apply filters by default. However, these new timeline configurations are not available on the make.pwoerapps.com (or in Classic Customization tools).

However, I found a way to set these configuration by updating customizations.xml file, lets dive into it!

Problem

Filter Timeline Records in a Dashboard.

When you add a timeline control to a Dashboard, you only see following settings:

The new Advacned proeprties are missing:

Solution

Not able to update form the UI? No problem, solution is to update the timeline control settings in the customziations.xml file.

Here a re steps to follow:

  • Create an un-managed Solution and add your Dashboard to it.
  • Next, export the solution (as un-managed), using default settings.
  • Now, extract the exported solution’s zip file.
  • Open the Customization.xml in your fav. editor.
  • Search for the “notescontrol“, and add following line under “<UClientEnableWhatsNewFilter>” tag as shown below:
<UClientDefaultFilterJSON>{"activityStatus":{"enabled":true,"value":["Active"]}}</UClientDefaultFilterJSON>

Here is the notecontrol’s XML for your reference:

<control id="notescontrol" classid="{06375649-c143-495e-a496-c962e5b4488e}" uniqueid="{14053dc3-159b-2496-9b13-022bc2825d21}" disabled="false">
    <parameters>
        <UClientUniqueName>Timeline</UClientUniqueName>
        <UClientModules>Activities,Posts</UClientModules>
        <UClientExpandFilterPane>true</UClientExpandFilterPane>
        <UClientShowFilterPane>true</UClientShowFilterPane>
        <UClientOrderBy>descending</UClientOrderBy>
        <UClientRecordPerPage>10</UClientRecordPerPage>
        <UClientSortActivitiesByValue>modifiedon</UClientSortActivitiesByValue>
        <UClientDisplayActivityHeaderUsing>defaultformat</UClientDisplayActivityHeaderUsing>
        <UClientCreateActivityUsing>quickcreateform</UClientCreateActivityUsing>
        <UClientDisplayActivityUsing>cardform</UClientDisplayActivityUsing>
        <UClientActivityCardMap>appointment:4201:,campaignactivity:4402:,campaignresponse:4401:,email:4202:,fax:4204:,letter:4207:,opportunityclose:4208:,phonecall:4210:,task:4212:,adx_alertsubscription:10590:,msdyn_bookingalert:10235:,msdyn_ocliveworkitem:10480:,msfp_alert:10216:,msfp_surveyinvite:10225:,msfp_surveyresponse:10227:,adx_inviteredemption:10593:,msdyn_ocoutboundmessage:10566:,adx_portalcomment:10642:,msdyn_approval:10265:,msdyn_ocsession:10489:</UClientActivityCardMap>
        <UClientDefaultModuleForCreateExperience>Posts</UClientDefaultModuleForCreateExperience>
        <UClientEnableWhatsNewFilter>false</UClientEnableWhatsNewFilter>
        <UClientDefaultFilterJSON>{"activityStatus":{"enabled":true,"value":["Active"]}}</UClientDefaultFilterJSON>
    </parameters>
</control>
  • Save the file, pack the files back to a zip package.
  • Import the Solution back in Dynamics 365 CE, and Publish customizations.

The following JSON (that we added), is to enable the filters by default and filter on “Active”, you can update this JSON as per your needs.

<UClientDefaultFilterJSON>
{"activityStatus":{"enabled":true,"value":["Active"]}}
</UClientDefaultFilterJSON>

Tip:

The easier way to get the filter JSON right is:

  • Configure the Timeline filters on a form (using UI, make.powerapps.com).
  • Add this form to a solution, export and extract the solution.
  • Open the customizations.xml, copy the filter JSON (UClientDefaultFilterJSON) and add it in the customizations.xml of the Dashboard solution.

Result

Before applying this solution, timeline does not enable filters by default:

After publishing the customizations, you can see filters are automatically enabled for timeline control in a Dashboard:

That’s it, Quite Easily Done!


This was originally posted here.

Comments

*This post is locked for comments