Update Business Process Flow Stage using Excel Import with Power Automate – Dataverse / Dynamics 365


In some business scenarios, we might need to update the Business Process Flow (BPF) stage of a record during an Excel import — especially during data migration or bulk record manipulation. In this blog post, we’ll walk through how to set a desired BPF stage (based on the stage name) and automatically move the record to that stage using Power Automate.

We’re working with a custom Dataverse table called Test(cr1a7_test) and a Business Process Flow named My Business Process Flow, which includes the following stages:

“select processidname,stagename, processstageid from processstage where processid = [processGUID]”

A screenshot of a computer

AI-generated content may be incorrect.

Our goal is to allow users to specify the stage name (e.g., “Stage 2”) through Excel import, and have a Power Automate flow update the record’s BPF instance to the corresponding stage automatically.

For this –

  • We’ll add a field called the Desired BPF Stage choice field on our table to store the desired stage name.
  • We’ll create a Power Automate flow that triggers on create or update.
  • We’ll maintain a static JSON mapping of stage names to stage IDs and their traversed paths.
  • We’ll look up the corresponding stage ID and traversed path from the JSON.
  • We’ll fetch the BPF instance for the record.
  • We’ll update the BPF instance with the new active stage and traversed path.

Below is how we can define our JSON structure for mapping, which we will store either in a variable inside Power Automate or save as an environment variable.

A computer code on a white background

AI-generated content may be incorrect.

Trigger – When a row is added or modified.

A screenshot of a computer

AI-generated content may be incorrect.

Initialize Variable with JSON mapping

A screenshot of a computer

AI-generated content may be incorrect.

Parse JSON – using the sample data

A screenshot of a computer

AI-generated content may be incorrect.

Use a “Filter array” action to find the object where stageName matches custom_desiredbpfstage.

A screenshot of a computer

AI-generated content may be incorrect.

Initialize variables to store the Stage ID and traversed path.

  • first(body(‘Filter_array’))?[‘stageId’]
  • first(body(‘Filter_array’))?[‘traversedPath’]
A screenshot of a computer

AI-generated content may be incorrect.

Use List Rows to check if BPF Instance exists or not, if not we will create it or update it.

  • length(outputs(‘List_rows’)?[‘body/value’]) > 0
A screenshot of a computer

AI-generated content may be incorrect.

Update or Create a new BPF instance associated with the record.

A screenshot of a computer

AI-generated content may be incorrect.

Below we can see the user specifying the Stage 3 value for the Desired BPF Stage column in the Excel to be imported.

A screenshot of a computer

AI-generated content may be incorrect.

We can see the Excel imported successfully.

A screenshot of a computer

AI-generated content may be incorrect.

Below we can see our flow running successfully.

A screenshot of a computer

AI-generated content may be incorrect.

And the record in Stage 3 of the BPF.

A screenshot of a computer

AI-generated content may be incorrect.

Hope it helps..

Advertisements

Fixed – The Default Unit is not a member of the specified Unit Group error in Dynamics 365 / Dataverse


Recently while trying to import the product records in our Dynamics 365 Sales, we got the below error – “The Default Unit is not a member of the specified Unit Group”

We were providing the correct UoM Group and Default UoM in our Excel file to be imported.

A screenshot of a computer

AI-generated content may be incorrect.

After some troubleshooting, we realized that we had 2 units with the same name “Primary Unit”, because of which the system was not able to identify the correct unit to be used during the import.

A screenshot of a computer

AI-generated content may be incorrect.

To fix this issue, we replaced the Name with the Guid of the record in our excel file.

A screenshot of a computer

AI-generated content may be incorrect.

This fixed the issue for us and we were able to import the product records successfully.

A screenshot of a computer

AI-generated content may be incorrect.

Hope it helps..

Advertisements

Failed to delete View (View Name). Object dependencies exist, please review before deleting error in Dataverse


While trying to delete a custom public view (Test View) in Dataverse, we encountered the following error:

“The SavedQuery(<GUID>) component cannot be deleted because it is referenced by 1 other component. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.”

This usually means that the view we’re trying to delete is still being referenced somewhere else in our environment — and Dataverse is safeguarding against breaking things.

A screenshot of a computer

AI-generated content may be incorrect.

Depedencies was pointing to the Lead form.

A green arrow pointing to a white background

AI-generated content may be incorrect.

The lead form had the campaign lookup and the test view was one of the selected views in “Allow users to change view”.

This means even if the view wasn’t the default for that lookup, the form still allowed users to switch to it, and that counts as a dependency.

A screenshot of a computer

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.

Removing it from the list and publishing the changes allowed us to delete the view.

A screenshot of a computer

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.

Note – Also check if it is being used as a Subgrid, if so temporarily remove the subgrid from the form to delete the view and than add the subgrid back.

Hope it helps..

Advertisements

Fixed – Field Service Time Entry functionality is not available. The installed version of Project Service Automation is not compatible with the installed version of Field Service. Please upgrade Project Service Automation to use Field Service Time Entry functionality.


Recently while trying to set Bookable Resource Booking record’s status as completed or trying to change Settings >> General >> Field Service Settings >> Time Entry, we were getting below error

A screenshot of a computer

AI-generated content may be incorrect.

We can see the Dynamics 365 Project Service Installation Failed and on retrying the installation it was giving below error.

A screenshot of a computer
AI-generated content may be incorrect.

The fix that worked here was to install the Project Operations.

Hope it helps..

Advertisements

Deleting Elastic Table Records in Dataverse Using Alternate Key in SSIS (KingswaySoft)


Had written a post on deleting the elastic table record earlier – How to Delete Elastic Table Records in Dataverse (SDK). We need to pass the partitionid value through an alternate key to delete the elastic table records. We will have the alternate key auto-created by the system when we create an elastic table. Earlier specifying an Alternate Key was not possible for the Delete action in the CDS Destination component. However, with the latest release (Version 25.1 – April 4, 2025), the Manually Specify and Alternate Key matching criteria support has been added when performing the Delete action as shown below. We also need to have the Use Homogeneous Batch Operation Message option checked, this uses DeleteMultiple request in the background.

On running the package, now we can see the elastic table records (having partitionid) getting deleted successfully.

A screenshot of a computer

AI-generated content may be incorrect.

After the successful run (here we are deleting 40K records), we can see the records deleted.

A screenshot of a computer

AI-generated content may be incorrect.

Hope it helps..

Advertisements

Step-by-Step: Configure Double Opt-In in Dynamics 365 Customer Insights – Journey (Real Time Marketing)


Double Opt-In is a two-step process for email subscription:

  • The contact fills out a subscription form (initial opt-in).
  • They receive an email with a confirmation link. Only after clicking that link is their subscription considered confirmed (final opt-in).

This process ensures that the person who signed up wants to hear from us—and that the email address is valid.

Enable the Double Opt-In Feature

Below is how we can enable it in Dynamics 365 Customer Insights – Journey

Go to Settings > Feature Switches > Compliance (Double Opt-In)

Create or Configure a Compliance Profile

The Compliance Profile is what governs how consent is collected and managed in real-time marketing.

Go to Settings > Customer engagement > Compliance profiles

Here we will enable it in the existing default compliance profile. We can have different compliance profiles for different regions, languages, or purposes.

Navigate to the Double opt-in tab.

A screenshot of a computer

AI-generated content may be incorrect.

As part of the setup, the system creates the Double opt-in email and the journey required as part of the process for that particular compliance profile.

A screenshot of a computer

AI-generated content may be incorrect.

We can see it configured after a few minutes.

A screenshot of a computer

AI-generated content may be incorrect.

Below is the email created by the system that will be used for the journey generated. Notice its state will be Ready to Send.

A screenshot of a computer

AI-generated content may be incorrect.

Similarly, we will have the journey created, with Status = Live.

A screenshot of a computer

AI-generated content may be incorrect.

Link Compliance Profile to the Form

Open an existing marketing form or create a new one.

In the form editor, drag a Consent field.

A screenshot of a computer

AI-generated content may be incorrect.

In the property pane for the Consent element, select the compliance profile (default one in our case), specify the purpose, and other required properties.

A screenshot of a computer

AI-generated content may be incorrect.

To see it in action let us submit the form using the standalone page.

A screenshot of a computer

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.

Till this point, we do not see any contact point consent record created.

A screen shot of a computer

AI-generated content may be incorrect.

We can see the confirmation email received in our mailbox. From there we can confirm it.

A screenshot of a computer

AI-generated content may be incorrect.
A paper with a check mark and a green circle

AI-generated content may be incorrect.

After confirmation, we can see our consent record created with the appropriate consent status.

A green pen pointing to a white box

AI-generated content may be incorrect.

Get all details

Also check out this wonderful tutorial – Dynamics 365 Customer Insights Journeys: How Consent Management Actually Works | Deep Dive Tutorial by Nathan Rose.

Hope it helps..