While trying to enable Admin Mode for one of our Dataverse Environments,
we got the below error
“This operation cannot be performed because there is an active lifecycle operation on the environment”
This was because we had a copy operation going in the background, we were copying that particular environment to another environment.
After the copy operation was completed (around 1 hour, for the environment DB Usage – 45 GB, File Usage – 118 GB, and Log Usage – 21.63 GB), we were able to switch on the Admin mode.
Recently in one of our environments, we were getting the below error on trying to create/update a contact or account record.
Exception Message: The user with SystemUserId=xxx-8c8f-ee11-be36-0022489338d1 in OrganizationContext=xxx-8c8d-ee11-8174-0022489425ce is disabled. Disabled users cannot access the system. Consider enabling this user for the action to succeed.. User IsDisabled=True, IsLicensed=True.
As the error message specifies, the system user record SystemUserId=xxxx-8c8f-ee11-be36-0022489338d1 was inactive/disabled.
So we can run the below query to check all the real-time workflows owned by that user
Next, we updated the Owner for all these workflows from Advanced Find.
This then allowed us to save the record.
Next we updated the owner of the remaining processes owned by the disabled user. We can also check and update the remaining components like plugin steps / cloud flows etc.
select workflowid, name, primaryentityname, categoryname, modenameg, owneridname, * from workflow
where
category = 0
and ownerid = 'abc-8c8f-ee11-be36-0022489338d1'
and mode = 1
Select * from sdkmessageprocessingstep
where impersonatinguserid = 'abc-8c8f-ee11-be36-0022489338d1'
The BypassBusinessLogicExecutionStepIds optional parameter or request header value allows us to bypass a specific plugin step by passing its GUID, irrespective of whether it is synchronous or asynchronous, unlike the other optional parameters – BypassCustomPluginExecution and BypassBusinessLogicExecution that will bypass all the custom synchronous and/ or asynchronous logic (plugins and workflows).
Below we have our plugin registered, that writes to the Plugin Trace log.
The plugin step is registered on the update of the lead record. We have got the StepId of the plugin step from the Properties window.
Below is our console app, which updates the lead, triggering the plugin. On running it without the BypassBusinessLogicExecutionStepIds, we can see the trace log parameter record created.
Upon adding the BypassBusinessLogicExecutionStepIds parameter in UpdateRequest, as shown below, the plugin is not triggered and no trace log is created.
Also, we can pass multiple Step’s GUID to it
By default, we can maximum of 3 steps to it, which can be defined through BypassBusinessLogicExecutionStepIdsLimit Organization Settings value.
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.
Now let us assign a custom security role – Test Sharing to test user 1 that gives him OrganizationLevel rights on the Project table.
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.
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 Permissions – User Level for the Artefact table.
Now Test User 1 can see the Artefacts in the related records as well as the App.
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.
Here if we update the Test Sharing role to provide Write access at User Level, the user will be able to edit the records.
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.
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.
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.
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
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.
Assigning it to the other active user, fixed the issue for us.
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.