Turn on failed or You need a Microsoft Dynamics 365 license to continue error while trying to Activate a Workflow – Dynamics 365 / Dataverse


Recently while trying to Activate a Workflow we got the below error –

Turn on failed. The user with SystemUserId=xxxxxxxx-483e-eb11-bf70-000d3a795b83 in OrganizationContext=xxxxxxxx-a88f-4f40-b654-7bab4d5c1f95 is not licensed. Please contact your system administrator to add license to this user for the action to succeed. SystemUserAccessMode=0 is not either of (NonInteractive=4, SetupUser=1). User IsDisabled=True, IsLicensed=False. ImpersonatingSystemUserId=xxxxxxxx-9fe2-47b8-84a9-d87c65dc9dfd.

The user account through which we were trying to do so had a System Administrator role, however, it turned out that it was because of the Owner of the Workflow. The system user record set as Owner of the workflow was Inactive.

A screenshot of a computer

Description automatically generated

Assigning it to the other active user, fixed the issue for us.

We were able to activate the Workflow than.

Hope it helps..

Advertisements

Flow Error – It hasn’t been triggered successfully in the last 28 days (Power Automate / Dataverse)


For one of our flows while testing we realized it was not getting triggered.

We could see it giving below error –

There’s a problem that needs to be fixed to trigger this flow – It hasn’t been triggered successfully in the last 28 days.

We tried a couple of things and I think either switching it on and off and/or updating the trigger condition and saving it temporarily seems to have fixed the issue. Either of these would have created the correct corresponding Callback registration records.

Also check – https://nishantrana.me/2023/08/08/fixed-power-automate-flow-not-getting-triggered/

https://powerusers.microsoft.com/t5/General-Power-Automate/There-s-a-problem-that-needs-to-be-fixed-to-trigger-this-flow-It/td-p/1128820

Hope it helps..

Advertisements

Use Filter Array action to remove values from an array variable – Power Automate


Suppose we have below array variable – varTestVariable having a list of GUIDs in it.

A screenshot of a computer

Description automatically generated

And we have another array variable varWorkOrderGuidToBeRemoved which has the list of GUIDs we want to remove from our first variable varTestVariable

A screenshot of a computer

Description automatically generated

For this, we can make use of the Filter array action

A screenshot of a computer

Description automatically generated

In From, first we have specified the array variable from which we want to remove the values, followed by the variable that holds the values to be removed. Next, we have specified the “does not contain” operator and finally specified the item()

We can also click on Edit in advanced mode to see or edit the expression.

We can use the Body of the Filter array action that will hold the result in subsequent actions.

A screenshot of a computer

Description automatically generated

On running the flow, we can see that the values that existed in the second array variable were removed from the first array variable.

A screenshot of a computer

Description automatically generated

Get more details – https://www.damobird365.com/efficien-union-except-and-intersect-great-method/

Hope it helps..

Advertisements

Fixed – The latitude or longitude for the User record associated with this resource is invalid – Dynamics 365 Field Service /Dataverse


While trying to set the Start Location / End location to the Resource Address for Bookable Resource, we might get the below error

Exception Message: The latitude or longitude for the User record associated with this resource is invalid. Please provide a valid latitude and longitude and then set the start and end location for this resource again.

Here as the error message specifies we need to specify the latitude and longitude value for the corresponding resource type record associated with the Bookable Resource.

In the case of Contact, we can use the Geo Code option, and specify the address to populate the Latitude and Longitude details.

A screenshot of a computer screen

Description automatically generated

In the case of a User record we do not see the Geo Code option so there we can manually specify the values for it.

Now we will be able to update the Start / End Location as Resource Address in our Bookable Resource record, without getting any error.

A screenshot of a computer

Description automatically generated

Get more details on Geocoding

Hope it helps..

Advertisements

Use Geolocation Settings for Location Tracking and Auditing – Dynamics 365 Field Service


We can track the different locations Field Service technicians have traveled or where they are at a given time inside Dynamics 365 Field Service. Field Service Technicians can enable location sharing from the app, and based on the Geolocation Settings configured, we can see the technician’s location in the schedule board and also list location history through the Geolocation Tracking record.

Navigate to Settings >> Geolocation >> Geolocation Settings.

By default, the Geolocation Settings will have Enable Location Tracking as No and Refresh Interval as 60 seconds.

Below we have updated the Geolocation Settings, updated the Refresh Interval to 120, and specified Tracking times for Monday to Friday, 24 hours. 

Refresh Interval specifies how frequently the system will check the user’s location, not the frequency for the creation of “Geolocation Tracking” records.

Geolocation Tracking records are created on Sign In, when a user moves more than 200 meters, and when the user comes to a still position after moving.

A screenshot of a computer

Description automatically generated

In the Field Service App, the technician has the location enabled in the settings.

A screenshot of a phone

Description automatically generated

Back in the Schedule Board, we can see the current location of the Field Service technician. (If we are specifying the Start / End location as the Resource Address for the Bookable resource, we will have to specify the latitude and longitude for the associated resource record)

Below we can see the corresponding Geolocation Tracking records created.

Get more details on Location Auditing.

Hope it helps..

Advertisements

Fix the trigger – Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types ‘Edm.Guid’ and ‘Edm.String’ for operator kind ‘Equal’ (Power Automate / Dataverse)


Recently in one of our flow triggers – When a row is modified (Dataverse), we got the below error

Exception parsing _msdyn_billingaccount_value eq ‘a84c5028-ecdf-ed11-a7c7-00224893b2b0’ submitted for attribute filterexpression of callback registration. Target entity: msdyn_workorder. Exception: Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types ‘Edm.Guid’ and ‘Edm.String’ for operator kind ‘Equal’.

This is because we were using single quotes around the GUID value in the Filter rows property.

We need to remove the single quotes around the GUID

GUIDs are considered a primitive data type in OData and should be represented as raw values without quotes. By removing the single quotes, we’ll ensure that the GUID is treated as a valid identifier in our filter condition.

Hope it helps..

Advertisements