Featured

Recent Posts


Loading…

Something went wrong. Please refresh the page and/or try again.

Advertisements

Fixed – Dependency Calculation – There was an error calculating dependencies for this component. Missing component id {GUID} – Dataverse / Dynamics 365


Recently while trying to create a new 1-n relationship between 2 newly created custom tables, we got the below error.

A screenshot of a computer

Description automatically generated

“There was error calculation dependencies for this component”

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The dependent component Attribute (Id=676fb834-d94a-47cc-9bee-2963ef589b83) does not exist. Failure trying to associate it with AttributeMap (Id=92f9f85a-7612-ef11-9f89-000d3a1b6f65) as a dependency. Missing dependency lookup type = PrimaryKeyLookup. (Fault Detail is equal to Exception details:

ErrorCode: 0x8004F036

Message: The dependent component Attribute (Id=676fb834-d94a-47cc-9bee-2963ef589b83) does not exist. Failure trying to associate it with AttributeMap (Id=92f9f85a-7612-ef11-9f89-000d3a1b6f65) as a dependency. Missing dependency lookup type = PrimaryKeyLookup.

).

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated

Instead of spending much time debugging, we thought of just trying and creating relationship from the Power Apps Maker Portal instead of classic UI.

A screenshot of a computer

Description automatically generated

And interestingly it allowed us to create the relationship without any error.

A screenshot of a computer

Description automatically generated

Hope it helps..

Advertisements

Understanding Privilege Check and Shared Access in Dataverse / Dynamics 365


Let us understand this with a simple example.

We have the following 2 custom tables having a 1 – N relationship.

Project (1-n) Artefact.

The relationship behavior is Custom with Cascade All for all the actions except Delete.

User 1 is the System Administrator and Test User 1 has the Field Service Admin role but doesn’t have any roles that give him access to the project or artefact table.

We can see the tables are not showing up for Test User 1 in the app unlike User 1 with the System Admin role.

A screenshot of a computer

Description automatically generated

Now let us assign a custom security role – Test Sharing to test user 1 that gives him Organization Level rights on the Project table.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

As expected, Test user 1 now has Projects appearing in the app, and as he doesn’t have any rights on the Artefact table, he cannot see it in the form or the app.

A screenshot of a computer

Description automatically generated

Now user 1 shares the Project 1 record with test user 1. Remember we have set Share as Cascade All in the relationship between Project and Artefact.

But still, because the user doesn’t have any privileges on Artefact, it doesn’t appear for Test User 1 on the form as well as the app.

Now let us update the Test Sharing Role and add Read PermissionsUser Level for the Artefact table.

A screenshot of a computer

Description automatically generated

Now Test User 1 can see the Artefacts in the related records as well as the App.

A screenshot of a computer

Description automatically generated

We can observe 2 things here –

  • Although Test User 1 only has User-level Access to the Artefact, he can still see the Artefact records created by User 1, as the parent Project record is shared with Cascade All–Share in the relationship behavior.
  • And as Test User 1 has only Read access he can only view the artefact records shared.
A screenshot of a computer

Description automatically generated

Here if we update the Test Sharing role to provide Write access at User Level, the user will be able to edit the records.

A screenshot of a computer

Description automatically generated

Also right now if User 1 creates the Project 2 record with the related P2 A2 artefact record, Test User 1 will only have access to the Project 2 record because of Organization Access but not to the P2 A2 artefact record as he has only has the user-level access.

A screenshot of a computer

Description automatically generated

Let us now update the Relationship Behaviour between Project (1-n) Artefact, and set Share to Cascade None.

Let us share the Project 2 record with Test User 1 now through the User 1 account.

A screenshot of a computer

Description automatically generated

As expected even after sharing the Project 2 record, Test User 1 does not have access to the P2 A2 artefact record as we had updated the relationship behavior as Cascade None for Share.

A screenshot of a computer

Description automatically generated

The first check that the user needs to pass is the Privilege Check, which checks if the user has the required privileges for that table before the Shared Access check

A screenshot of a screenshot of a record

Description automatically generated

Also, Check – How access to a record is determined.

Hope it helps..

Advertisements

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 –

A screenshot of a computer

Description automatically generated

Turn on failed. The user with SystemUserId=f02934fa-483e-eb11-bf70-000d3a795b83 in OrganizationContext=37c5705b-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=a18194b7-9fe2-47b8-84a9-d87c65dc9dfd.

A computer screen shot of a computer

Description automatically generated

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.

A screenshot of a computer

Description automatically generated

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.

A screenshot of a computer

Description automatically generated

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