eXtreme365 Lisbon 2017 Highlights

Extreme365, the new ExtremeCRM has just completed in Lisbon, Portugal. What an amazing, beautiful and fun location to hold a great Dynamics conference. Lisbon was great, the food, historic locations, and the landscape were second to none. This event exceeded expectations with the quality of the sessions, the information shared by partners, MVPs and Microsoft themselves. I met so many smart Dynamics professionals and just really fun people to hang out with. It was an honor to be both an attendee to a great conference and a speaker. Big shout out to Nelson Lopes from Microsoft Canada for guiding us on an amazing Portuguese experience over the week.

So what was the hot news coming out of the event? A lot of great sessions from a number of partners as well as the Microsoft product group, here are some of the top things that caught my attention:

  • Virtual entities – allow data in external systems to be represented as CRM entities and can take advantage of Business Process capabilities. These are just models in the Dynamics system but no tables created in the database and no data is replicated. Plug-in to APIs and surface external data to Dynamics within the Dynamics interface. Have an Azure DocumentDB you want to show in Dynamics, or maybe some Salesforce data (😈), as long as it has an API or you can create your own you can surface the data and interact with it within Dynamics like its native Dynamics data. Important to note that there is no security model in Dynamics for virtual entities, security is the responsibility of the source system or API.
  • Flow and Logic Apps are major investment areas for the Dynamics product group. I think we can expect a lot of improvement to existing features and new functionality coming to these components, it is the workflow engine of the future.
  • Read only replicas across regions – if you’re a global organization then this one is for you. No longer will you have to deal with long latency to access to Dynamics data in another region. Coming in a future release will be the ability to replicate your Dynamics data to various regions but only in a read-only state, one region will remain as your primary with full read/write functionality.
  • 3rd party search functionality to allow a pluggable search provider instead of the relevance search that is powered by Azure.
  • Event Management – still coming and with an Event Management Portal! Organize events into sessions and tracks, manage schedules and conflicts, and track registrations.
  • On Premise Dynamics to need an Azure Pack in a future release to support items like a service bus and other functions so that closer parity between online and on premises can be maintained.
  • ALM for Dynamics – the cries for more robust Application Lifecycle Management tooling with Dynamics 365 have been heard and the platform team will be bringing PowerShell and API functions to provide better ALM functions for online. Exact details in terms of functionality are unknown as is the timeframe for this, but great news to hear — personally and from Adoxio’s perspective we really hope to see similar tooling to the ADX AlmToolkit and scripting capability for Configuration Data Manager so that it doesn’t have to be run interactively.
  • Custom controls like the Gantt chart in Project Service will be part of the solution architecture (they actually already are for PSA) in the next release so you as an partner or ISV can build your own controls and easily transport them just like other Dynamics components. Custom controls will be developed using standard web development technologies, JavaScript, CSS and image file assets.

For myself and Adoxio this was also a big event in that we launched both the Adoxio Connect Framework for Dynamics 365 as well as Adoxio Connect365. We were extremely excited to be able to do it at this event so we could share it with the Dynamics community and it has already been a great success. The Adoxio Connect Framework has been released as an open source library under GNU LGPLv3 so other partners are able to utilize the same core connection framework as we do to build our own products. We really want everyone to succeed with Dynamics 365 portals and we think the framework and the concepts we presented are a great way to help fill the functional gaps whatever they maybe for your implementation.

Adoxio Connect365 is our subscription based service built on top of the framework that has a number commonly requested extensions for the portals; modules available: SharePoint, Payment Services, ESRI and soon to come PowerBI. Connect365 can help you immediately add functionality that wasn’t possible before to your portals without having to invest, develop, maintain or even worrying about hosting and be supported by those that know portals the best. To learn more about Adoxio Connect Framework for Dynamics 365 and Adoxio Connect365 check out some of the links below. This is just the beginning, there will be so much more to come.

Thanks to the Extreme365 team for putting on incredible event, myself and the whole Adoxio team can’t wait till the next one!

Note: This post also appears on Adoxio Business Solutions Team Blog.

Speaking at eXtreme365 2017 Lisbon

I am very excited to be speaking at the new eXtreme365 (formerly eXtremeCRM) in Lisbon March 13 – 17, 2017!

I will be delivering two sessions at the partner and customer events on Dynamics 365 portals, and excited to make public a new framework Adoxio has been working on to bring extended customization capabilities to Dynamics 365 portals. As part of this we will be demoing, as well making available our core common template that our solutions and products are built on to eXtreme365 attendees.

The purpose of the eXtreme365 conference is to help the Microsoft Dynamics 365 (CRM) community more effectively grow their business by selling, deploying and extending the Microsoft Dynamics 365 solution. eXtreme365 is dedicated to providing insight to the Microsoft Dynamics 365 future vision and strategy and encourages sharing of knowledge among the Microsoft Dynamics 365 community. eXtreme supports critical connections with Microsoft, ISVs and partners – all with a goal of helping the community learn, grow and work more productively together.

If you’re in Lisbon and want to learn about Dynamics 365 portals then it would be great to meet you and to have you at the sessions.


Partner Session: Extend Dynamics 365 portals with Custom Code

14/03/2017 16:45 – 18:00

Reached the limitations of configuration with your Dynamics 365 portal and need to extend it with custom functionality? In this session learn how to create your own portal companion web app using Dynamics 365 Server-to-Server authentication and a secure token service (STS) for seamless integration with your Dynamics 365 portal and the ability to write your own custom C# code.

Attendees will see an end to end solution example and gain access to the templates to kick start your own custom portal development. Build custom integration or a complex API or whatever your business requirements demand with the power of the CRM SDK and the .NET Framework for your portal.


Customer Session: Everything you need to know – Dynamics 365 portals Implementations

17/03/2017 15:15 – 16:15

Interested in learning about Microsoft Dynamics 365 portals and what an implementation looks like? Join our session to learn about best practices, methodology, and get a basic understanding of how this solution can be applied to your organization.

Dynamics 365 portals – Display Activities with Timeline

A new feature launched at the inception of CRM portals but never really documented is the ability to display entity record related activities on the portal through a new timeline feature. This feature was created to enhance the portal case management functionality by allowing the display of any activities related to the entity record (using the regarding field). This functionality is actually configuration based through a new entity form metadata type of “Timeline”, which can also be used with your own entity forms with any entity that is activity enabled.

To add the timeline to your own entity form there are a couple configuration steps you will need to make to successfully setup. To use the timeline metadata type the entity your working with will need to be activity enabled otherwise the metadata option will not display. You can activity enable your entity by opening the System Customizer and navigating to the entity information, on the general tab under Communication & Collaboration ensure Activities is selected.

activity_enable

You can now create an entity form in either Edit or Read-Only modes where you can then add the timeline metadata type. Below is the minimum configuration for an entity form for edit mode:

entityform_general

Once you have your entity form created, we need to add the associated entity form metadata for the timeline. Scroll to the bottom of the entity form configuration or from the related entities navigation select Entity Form Metadata and create a new item. In the new metadata form, select the type as “Timeline”.

metadata_type

Once on the type “Timeline” the options panel below will update to reveal the new configuration options for activities. At this time it is mostly focused around the portal users ability to contribute content as an activity, and what file upload functionality they have. You can also select the “Advanced Options” to reveal a number of additional labels that can be modified.

timeline_options

The portal timeline feature utilizes the activitypointer entity in Dynamics to query for the related activities and supports the following activity entities. It does not support custom activities it appears at this time, however you can expose additional activity types (like task) or custom activities through sub grid functionality.

  • Portal Comment
  • Appointment
  • Phone Call
  • Email

For this configuration to properly function Entity Permissions need to be configured. We are going to assume you have already created an entity permission of the entity, in the case of mine, the entity Economic Development Sites (adoxio_economicdevelopmentsite), with the scope of contact (there is a related contact field that is a lookup to the contact entity), the privileges (read, write, create, append, append to), and with the desired web roles set.

There needs to be 2 additional entity permissions added, one for the activitypointer entity, and another for the Portal Comment activity. Both entity permissions should have the scope of parent and set the parent entity permission to the permission of the entity being viewed. This ensures that only the activities which are related to the record are accessible.

Activity (activitypointer) –Β Privileges: Read

activitypointer_permission

Portal Comment(adx_portalcomment) –Β Privileges: Read, Create, Append

portalcomment_permission

Portal Comment is a new activity entity that replaces the use of notes/annotations for user submitted content. This was done so that a entity relationship to contact was established and it would support native entity permissions. Annotations are still used to hold the contents of attachments on the portal comment activity record. Back office staff can create new Portal Comment activities within Dynamics regarding the entity record and once marked complete will be displayed on the portal.

Once all the configurations are complete, you can now view your edit or read-only entity form with an included timeline view of activities.

overview

CRM SDK 6.1.2 Released – Fixes Adxstudio and Dynamics 365 Compatibility

Microsoft has released an update to the CRM 2013 SDK with a new version, 6.1.2. This version includes changes to support the new authentication protocols introduced in v8.1.1 of the SDK. Since the Adxstudio Portal v7 relied on the CRM 2013 SDK, without this new version of the SDK it was unable to connect to Dynamics 365 instances due to the deprecation of the Azure Access Control Service (ACS) endpoint from all v8.2 instances. Now with this new CRM SDK you can include it in Adxstudio Portals v7.x projects so they will be able to connect successfully to Dynamics 365!

The new CRM SDK v6.1.2 has been posted to Nuget – https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/6.1.2. This new DLL will likely be included in the next Adxstudio Portals v7 release but until then you can manually add it to your projects via either of the following methods:

BIN folder drop
Use this method if you have not customized the code and only deployed the out of box MasterPortal

  1. Download the updated CRM SDK v6.1.2 Nuget package from nuget.org
    https://www.nuget.org/api/v2/package/Microsoft.CrmSdk.CoreAssemblies/6.1.2
  2. Use WinRAR or 7Zip or other compression utility to open the Microsoft.CrmSdk.CoreAssemblies.6.1.2.nupkg file. Right click the file in Windows Explorer, select Open With… and select your desired ZIP compatible compression program. Alternatively, change the file extension to .zip.
  3. Extract the Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll from lib\net45 folder to a local folder location.
    nugetwinrar
  4. Copy the Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll files to the MasterPortal\bin\ folder where your portal code is deployed, overwrite both the existing files when prompted.
    Note: When replaced this will cause the portal application to automatically be restarted.

Visual Studio – NuGet Package Manager
Use this method if you are customizing the MasterPortal project and need to recompile the MasterPortal with custom code or update your reference to a new DLL location.

  1. Open your MasterPortal Visual Studio Project. In the solution explorer pane, expand the MasterPortal, right click References and select Manage NuGet Packages…
    managenuget
  2. From the NuGet Manage Packages window, select Browse from the top instead of the default of installed and enter in the search “crmsdk”.
    nugetsearch
  3. From the results select “Microsoft,CrmSdk.CoreAssemblies” the package will be by crmsdk.
    nugetselectpackage
  4. In the right pane of the NuGet window use the version selector to select 6.1.2, and click Install.
    nugetinstall
  5. You will be prompted for a dependency to Microsoft.Identity, confirm the dialog and accept the terms to install the packages.
    nugetreview
  6. Once completed you can rebuild the MasterPortal project and re-deploy your customized portal for Dynamics 365 compatibility.

One thing to be aware of with using NuGet Package Manager is that it can have the side effect of doubling up some of your dependent assemblies in the web.config. A base MasterPortal this was not an issue but something you may want to review your web.config after to ensure it doesn’t have any extra items that you do not need. Also if you use NuGet to add other packages to your project be cautious when updating to not include the Microsoft.CrmSdk.CoreAssemblies in any update.

Alternatively from NuGet you can use the BIN drop method as well with your Visual Studio project. Instead of dropping the updated assemblies in the BIN folder, instead drop them in your reference assembly folder, perhaps called Framework or DllImports. This would replace your existing DLLs in that reference folder.

The new CRM SDK 6.1.2 should also work with any previous versions of CRM, allowing you to pre-update your Adxstudio Portal projects prior to upgrading your CRM to Dynamics 365.


Why this was update necessary:

With the deprecation of Azure Access Control Service (ACS), we have to modify our SDK authentication code by removing all references to ACS. Effective from versions Microsoft Dynamics CRM Online 2016 Update 1 (v8.1.1) and Microsoft Dynamics 365 (v8.2), we removed Live ID support and ACS dependencies on the server-side.

We also removed Microsoft.Xrm.Client from the CRM 2016 (8.x) SDK client because it was not compliant with the OAuth changes, and replaced it with Microsoft.Xrm.Tooling.Connector. You can use the current Microsoft Dynamics 365 Software Development Kit (SDK) to access Microsoft Dynamics CRM back to version 6.x for both auth and messaging.

https://blogs.msdn.microsoft.com/crm/2016/12/21/dynamics-365-sdk-backwards-compatibility/

For some additional context you can read my previous post – Dynamics 365 and Adxstudio Portals Compatibility

Dynamics 365 portals – Extend Search Results with Handlebars

With the Adxstudio Portals v7 product I can’t count the number of times that Adoxio has had to extend the search functionality with enhancements for customer requirements. With the latest release of Dynamics 365 portals, Microsoft has really made extending and customizing the out of box search extremely easily and powerful. The search is now built on top an asynchronous call to ensure page load performance is fast and the results all rendered with Handlebars templates. They have really gone a step further by taking those Handlebars templates and making them accessible through the Web Templates functionality; results display, paging, sorting, and the new facets are all available as Web Templates that you can customize and configure.

You can read more about the new base search functionality from a blog post on the Dynamics Team MSDN Blog, Search enhancements in Portal capabilities for Microsoft Dynamics 365.

If you’re not familiar with Handlebars you might be wondering what it is. Handlebars is a JavaScript framework, in which you can build semantic templates, with no frustration, or so they say πŸ˜‰ – read more about why semantic templates help developers from Martin Brennan, Semantic templates with Mustache.js and Handlebars.js. Think of a template as being a view of how you want each item in the results rendered; put the title in an H3, description text in a P, add this class, etc. Why this is important is that the framework has a lot of power that beyond just formatting that allows you to easily modify the templates so you can create your own views, but also extend the functionality by adding helper methods with custom logic.

With the functionality of Handlebars helpers you can build functions to process the data submitted to a template. So if you wanted to do some sort of conditional processing or format on each item rendered, building your own helper can help you meet a certain requirement. Recently on the Dynamics Community Forum a member was looking to extend each result item with additional data from the full entity itself. So if the result was a Knowledge Article they might want to also show the subject or other categorization metadata in the search result. The default data context returned by the search to keep performance high has a limited set of attributes that really only include what you see rendered in a result. With a Handlebars helper and the power of Liquid we actually have the capability to go get the detail data for that particular entity record result.

For this example the Handlebars helper is going to make a synchronous AJAX request passing the entity ID of the result item, which will be then processed by a Web Template using Liquid to go get additional data that will then be included in the result item. First we need to setup our Web Template that will take the entity ID and go get the additional data and format it for us.

{% assign eid = request.params['entityid'] %}
{% assign wpage = entities.adx_webpage[eid] %}

<p><strong>Name:</strong> {{wpage.adx_name}}</p> 

We are going to assume for this that the result is always a web page but you could easily add an additional parameter for the entity logical name and then have conditional branching to handle different entities. Basically the template just takes the query string parameter entityid, uses the liquid entities object to query the web page entity for the desired ID then displays the page name back. You could access any of the attributes in the web page or whatever entity you had queried.

Once the Web Template is created we now need to make it accessible to the AJAX call we are going to later configure. To do so we need to add a Page Template that uses this Web Template. Create a new Page Template from Portals > Page Templates. Ensure to set the Type to “Web Template”, select the Web Template as the template you just created, and deselect the “Use Website Header and Footer”. All we want this page to return is the HTML that is to be included in the result.

search_details_pagetemplate

Now to make your page template accessible via a URL you will need to create a Web Page that surfaces the Web Template your Page Template refers to.

search_details_webpage

You can test your template is accessible by just directly calling its URL in your browser with an ID included, https://testingportal0001.microsoftcrmportals.com/search-details/?entityid=94216ad7-7864-e611-80d7-00155db4fa48. All you should get back is the simple HTML in the template since we removed the Website Header and Footer.

Now we need to register our Handlebars helper that is going to request this template. To do so we need to add some custom JavaScript to the search results page. This can be easily done with the front-side editor or you can access the web page from the CRM (Portals > Web Pages > Search). If using the front-side editor, login with your Administrative account, run a search query and then select the Edit from the CMS control, select the Options tab, and then paste in the following to the custom JavaScript section.

Handlebars.registerHelper("search_details", function (obj) {
    return $.ajax({
      url: "/search-details/?entityid=" + obj.fn(this),
      type: "GET",
      async: false
    }).responseText;
});

Basically it makes a synchronous AJAX request (it needs to be synchronous as the it is already an asynchronous request for the results) to the URL we created with our Web Page passing the entityID. It will return the HTML as the responseText which is then returned as the result of the Handlebars helper. You would be able to put whatever logic you want within this function, whatever JavaScript allows you to, which is A LOT.

Now that we have our helper function, and our template, its time to modify the search results Web Template that is provided out of the box to include a call to our new helper. Navigate in CRM to Portals > Web Templates, open the “Faceted Search – Results Template” and you want to add the following within the {{#each items}} where you want your extra details to show up: {{#search_details}}{{entityID}}{{/search_details}}. This will call our helper method passing the entity ID of the result item.

{{#each items}}
 <li>
  <h3><a title="{{title}}" href="{{url}}">{{title}}</a></h3>
  <p class="fragment">{{{fragment}}}</p>
  {{#search_details}}{{entityID}}{{/search_details}}
  <div>
   {{#each tags}}
    <span class="{{cssClass}}">{{./label}}</span>
   {{/each}}
  </div>
 </li>
{{/each}}

With Dynamics 365 portals you also need to be very aware of entity permissions. Our liquid query will return nothing if we do not provide permission to that entity. You will need to decide exactly how to configure the entity permission, for this example I am just adding an entity permission for Web Page with a Global scope and the Web Roles Anonymous and Authenticated User. It is important to be careful and aware of what you configure with entity permissions as they are what gate and protect the data in your CRM.

Now that it is all configured, head back to the portal and refresh your search results or perform a search query. Your results should now include your extra template on each and every result.

search_details_results

My template for this example was simple, but with the power of liquid querying you could really include anything here. This example also focused on adding additional details but Handlebar helpers can be used for a lot more.