The selected system job could not be deleted. Only completed system jobs can be deleted – Delete Recurring Bulk Deletion Jobs (Dynamics 365 / Dataverse)


While trying to delete a Recurring Bulk Deletion Job we would get the below error.

“The selected system job could not be deleted. Only completed system jobs can be deleted”

The way we can delete them is first to Cancel them.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Next is to update the recurrencestarttime column value to 9999-12-31 for it.

We can use our wonderful XrmToolBox Plugin – Bulk Data Updater for it.

A screenshot of a computer

Description automatically generated

This updates the Postponse Until value in the background.

Now if we try deleting it, we will be able to delete it successfully.

A screenshot of a computer

Description automatically generated

Check for more details – https://community.dynamics.com/forums/thread/details/?threadid=b5bb6278-971c-440c-be08-d669df8c5787

Hope it helps..

Advertisements

Date Window Start and Date Window End fields missing on the Work Order form – Dynamics 365 Field Service


Recently we found that in one of the environments, the Date Window Start / End Dates was not showing up on the Work Order Forms, unlike the other environments.

Check the forms below

Well, the show and hide of the Date Window Start / End Date is controlled from Field Service Settings >> Fields Service >> Agreement

Setting Pre/Post Booking Flexibility Date Field Population to Populate Date Window Start / Date Window End will unhide the fields on the form.

Below is the corresponding out-of-the-box script that shows/hides the fields.

A screenshot of a computer

Description automatically generated

Also worth noting is that these fields are deprecated, as Microsoft recommends using Time From Promised and Time To Promised fields instead to define the date window in which a job is performed.

When setting up an agreement, you can control how work order scheduling works with pre-booking and post-booking flexibility. These fields define a window of time for scheduling each work order.

There are two options for how this window is used:

  • Date Window Start/End: The agreement populates these fields with the scheduling window. This makes the “Date Window Start/End” section visible on the work order itself.
  • Time From/To Promised: The agreement doesn’t directly affect these fields, but the scheduling window is considered during the scheduling process. “Date Window Start/End” will be hidden in this case.

This setting essentially determines where the scheduling window information is stored and displayed for work orders generated from this agreement.

Get the details

Hope it helps..

Advertisements

Fixed- Flow not getting triggered (Callback Registration)– Power Automate / Dataverse


Recently in one of our test environments, the out the box flow – “Deserialization of Inspection Definition” wasn’t getting triggered even when it was in the On state.

This was because the “CallbackRegistrationExpanderFilter” operation was failing with the below error.

Unexpected failure during ValidateUserAccessCached. Ex: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The specified user(Id) is disabled. Consider enabling this user. Additional Details: User IsDisabled=True, IsLicensed=True. ImpersonatingSystemUserId. (Fault Detail is equal to Exception details:

ErrorCode: 0x80040225

Message: The specified user(Id = xxxx-xxxx-xxxx-xxx-xxxxxx) is disabled. Consider enabling this user. Additional Details: User IsDisabled=True, IsLicensed=True. ImpersonatingSystemUserId=xxxx-xxxx-xxxx-xxx-xxxxxx)

TimeStamp: 2024-05-20T21:50:42.6724270Z

More on Callback Registration Expander Job – https://rajeevpentyala.com/2021/01/30/callback-registration-expander-system-jobs-waiting-for-resources/

This was because the flow’s corresponding Callback Registration record’s Owner was a user whose account was now disabled in CRM.

So the option to fix was to Turn off and Turn On the flow, which will delete the old callback registration record and will create a new one with the user who is turning off / on the flow. Updating the owner of the flow will not work here, as it won’t update the existing callback registration record.

Also we had another observation, if a callback registration is owned by a user who is a proper / enabled user in CRM, simply turning off and on the flow using a different user account will not delete the existing callback registration record and create a new one with that particular user as the owner. In this case we will have to explicitly delete the existing callback registration record.

Hope it helps..

Advertisements

How to – enable/disable the timeline highlights generated by generative AI – Dataverse / Model-drive Apps


With the Timeline highlights (Generative AI) feature, agents can quickly view the critical information (summary) about the different activities in the timelines, without the need for clicking/reading through each of the activities.

We can enable and disable it at both the form level, app level and environment level.

At the form level, we can check/uncheck the Enable Timeline Highlights checkbox for the timeline component.

A screenshot of a computer

Description automatically generated
A screenshot of a computer screen

Description automatically generated

At the App level, open the Settings >> Features for the corresponding App.

A screenshot of a computer

Description automatically generated

Here if we disable it at the App-level it won’t show up even if it is enabled for that particular form for that particular app.

For e.g. we see timeline highlights in the Sales Hub App but not in the Field Service app in which we had it disabled for the account form.

We can also specify it using the Setting Definitions and Environment values as shown below.

A screenshot of a computer

Description automatically generated

More details –

Use timeline highlights powered by generative AI

Timeline highlights help users quickly access actionable record updates

Hope it helps..

Fixed – The system could not log you on. This could be because your user record has been disabled in Microsoft Dynamics 365 error when trying to create or save a record


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.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

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.

Click here for more details.

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'

Hope it helps..

Advertisements

Bypass execution of specific plugin (step) using BypassBusinessLogicExecutionStepIds parameter – Dynamics 365 / Dataverse


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).

Using BypassCustomPluginExecution and BypassBusinessLogicExecution parameters – https://nishantrana.me/2024/05/21/using-bypassbusinesslogicexecution-parameter-preview-to-bypass-custom-sync-and-async-logic-plugin-and-workflow-dataverse-dynamics-365/

Below we have our plugin registered, that writes to the Plugin Trace log.

A screenshot of a computer program

Description automatically generated

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.

A screenshot of a computer

Description automatically generated

Upon adding the BypassBusinessLogicExecutionStepIds parameter in UpdateRequest, as shown below, the plugin is not triggered and no trace log is created.

A screen shot of a computer code

Description automatically generated

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.

Get more details

Hope it helps..

Advertisements