ASP.NET Web API, C#, Web Application

No HTTP resource was found that matches the request URI

We were getting a very silly error on deploying a webapi based service.

It was a GETAction

[Route("api/OCS/unbarmsisdn/{msisdnparam}")]
public IHttpActionResult UnbarMsisdn(string msisdn)
{

....

}

We were getting the following Error message:

No HTTP resource was found that matches the request URI

 

The problem was simple but can be easily missed.

Let’s look at the method definition again:

[Route("api/OCS/unbarmsisdn/{msisdnparam}")]
public IHttpActionResult UnbarMsisdn(string msisdn)
{

....

}

 

If you noticed there’s a difference between the Method parameter and the Route Decorator parameter. Both parameters should have the same name and you should be able to browse the method using the browser.

 

 

Advertisements
Standard
Field service, Microsoft Dynamics 365, Microsoft Dynamics 365 Field Service

A generic Sync filter for Customer Assets in Field services

As we know the Microsoft Field service app has offline capability but there are few design decisions that can help you and your customers in long run.

One important aspect is to decide upon the sync filters which drive what data is available for Users while they work in offline mode.

In this post I would be focussing on Sync filter for Customer assets and it becomes even more important if your customer has a lot of Assets in the field.

Deciding upon sync filters should be a continuous improving/ agile process rather than spending time on thinking  the best solution for the very first time.

Here was our Sync filter journey for Customer assets:

  • We started with No sync filter. This is because we weren’t sure how many assets would the customer have/create over the period
  • Next step was to at least filter out inactive assets
  • Now when the asset number started growing, we deciding upon just showing the Assemblies which are nothing but Asset containers at each site. This worked for a while but then technicians had no insight when at a site that this assembly had what assets.
  • We finalised upon showing all Assets (Parent/ Child) in the territories that the User works in. This was great, now the User could see every asset that he/she deals with.
  • After a while this also starting blowing apart as few Users were catering to multiple territories and by default there’s a hard limit of 10000 records that you can sync for an entity in offline mode.
  • The business then decided to re do their territories and create new territories for overlapping areas.

The point here is that no one solution will fit all customers and solution for today may become obsolete tomorrow.

One good thing with woodford sync filters is that we can use fetchxml to build them,

Here’s the sync filter fetch xml we finalised upon:

<?xml version="1.0" encoding="utf-8"?>
<fetch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
<entity name="msdyn_customerasset">
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
</filter>
<link-entity name="account" alias="L0" from="accountid" to="msdyn_account" link-type="inner">
<link-entity name="territory" alias="L1" from="territoryid" to="msdyn_serviceterritory" link-type="inner">
<link-entity name="msdyn_resourceterritory" alias="L2" from="msdyn_territory" to="territoryid" link-type="inner">
<link-entity name="bookableresource" alias="L3" from="bookableresourceid" to="msdyn_resource" link-type="inner">
<filter type="and">
<condition attribute="userid" operator="eq-userid" />
</filter>
</link-entity>
</link-entity>
</link-entity>
</link-entity>
</entity>
</fetch>
Standard
Microsoft Dynamics 365 Field Service, Resco Field service Mobile

Activating field service mobile licenses for D365

If your customer has D365 FS licenses and you were using Woodford solution to customize the Microsoft FS mobile app or Resco FS app, the woodford trial would eventually expire after a period of 30 days.

However for each D365 FS license you can activate a FS mobile app license as well, how to do it is explained in detail on the following URL:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/field-service/activate-fs-mobile-app-license

 

 

 

Standard
Microsoft CRM Dynamics, Microsoft Dynamics 365

New PowerBI dashboard button not showing in D365

Recently we had a requirement to show existing PowerBI dashboards in Dynamics 365.

When we tried to create a Power BI dashboard in dynamics, we couldn’t see the “New PowerBI dashboard” option on Dashboards page.

1

The problem was the PowerBI dashboards feature in Dynamics has to be enabled before we can go ahead and add a dashboard.

This is how to enable it:

  • Sign-in to Microsoft Dynamics 365 as a user with the system administrator security role.
  • Go to Settings > Administration > System Settings.
  • On the Reporting tab in the Allow Power BI visualization embedding option, select Yes to enable.
  • Click OK.

Once you are done, refresh the Dashboards page and you should now be able to see the Add new button.

2.JPG

 

Note: To access PowerBI dashboards in Dynamics, the users would need Power BI pro license. Exception being if customer has power BI premium, in that case only users creating power bi reports need to have power bi pro licenses.

 

Standard
Dynamics 365 Field Services, Resco Field service Mobile

Resco Field service mobile app – Error loading woodford solution – CRM metadata failed to refresh

If you are trying to make any customizations to the Resco Field service Mobile app, you would encounter few strange issues at times which can block development.

Note: In case you are unaware, the silverlight based woodford solution just works in IE(Tested in IE11) and that too in non-incognito mode i.e. if you are working in incognito mode, the solution will fail to load.

Also many times the solution gets loaded but towards the end it gives you error saying CRM metadata failed to refresh and then all you can access is your Profile tab (and other non dev related tabs).

I haven’t been able to find a solution to the above problem except for restarting IE again, seems like a caching issue.

Standard
Azure, Cognitive services, Connected Field Service

Invalid subscription key error when connecting Azure cognitive services Face API

Recently during an integration scenario with D365 Field services in order to identify if the person making a change to the Customer asset is an employee or not we spinned up an Azure Face API service and on trying to connect it from an Azure function we were getting Invalid key exception.

We were using the Face API client library which defaults to west US endpoint of the service but our service was in EastUS.

Default endpoint: https://westus.api.cognitive.microsoft.com/face/v1.0/

The solution is to override the endpoint to https://eastus.api.cognitive.microsoft.com/face/v1.0/ which can be done by using another constructor of the FaceServiceClient class

FaceServiceAPIClient = new FaceServiceClient("Face API subscription key", "https://eastus.api.cognitive.microsoft.com/face/v1.0");

 

 

Standard
Dynamics 365 Field Services, Microsoft Dynamics 365 Field Service

How to sync Resource Bookings in Field service with MS Outlook

A very basic Field service use case is that bookings should show as appointments in MS outlook so that users can keep track of bookings and other office tasks in one single view.

Fortunately this is configurable in D365 FS, however there are few prerequisites:

  • Dynamics 365 Field Service licenses
  • Office 365 Enterprise E3 licenses

Here are the steps to enable synchronization of bookings with User’s calendar:

1.1.1.1       To be done by Dynamics 365 Administrator

  • From the main menu, click Settings -> Administration.
  • Click System Settings -> Synchronization.
  • Under Select whether to enable syncing of resource booking with, check the Synchronize resource booking with Outlook.

 

1.png

 

1.1.1.2       To be done by each User(Bookable Resource)

  • Click the Settings button in the upper-right corner of the screen.
  • Click Options and then Synchronization tab.

 

2.png

  • Under Resource booking sync with Outlook, check the Synchronization resource booking with Outlook.

 

Standard