# Learn How To Troubleshoot Company Records Issue In Dual-write

Ever been configuring and validating Dual-write health checks and then notice that one of your colleagues set up a new legal entity in Dynamics 365 FO and failed to sync company records moving to Dataverse and refreshing the Dual-write maps as a last option but nothing is working?

On checking the error or behavior using the Plug-in registration tool, you see an observation that reads Company records are not to Dataverse.

In this blog post, I will share my learning on how to troubleshoot company records sync issues with Dataverse when you have Dual-write infrastructure.

# What is a Legal entity or company record sync issue?

Well, when you enable Dual-write infrastructure for your business processes to sync data between Dynamics 365 CE (CRM) and Dynamics 365 FO (ERP). Sometimes your Dynamics 365 FO record which is tagged to a company (**dataareaid**) is not synchronizing correctly.

My video explains how company records are moved to Dataverse based on table relationships.

%[https://youtu.be/yNyKslb2-Vc] 

# Is this really necessary for us to know?

Quite reasonable. Due to its importance for record identification and its prevalence in the Dual-write infrastructure.

# Why does this issue occur?

There could be three main reasons for such types of issues.

1\. New legal entity is not set up for Dual-write using the **"environment details"** option

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182072139/e5a45f3a-8db3-42de-ab32-7156af0a8339.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182088472/c43a6bcd-20e5-47d7-a96d-852a13b5828b.png align="center")

2\. Orphaned legal entity records left in the below tables while unlinking the Dynamics 365 FO & Dataverse environment

**DualWriteProjectConfiguration**

**DualWriteProjectFieldConfiguration**

**BusinessEventsDefinition**

3\. Forgot to check the **"Force reset option"**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182215713/297cf7d9-682e-4b86-a341-c30be4352cf9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182226201/014d49f8-a179-447a-bbbf-84d567ca852c.png align="center")

# Troubleshooting steps

*A. Validate Company Records*

1\. Head over to [make.powerapps.com](http://make.powerapps.com) & Dataverse environment

2\. Look up for **“company”** table in Dataverse

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182288084/31ebf468-44cc-4400-950c-c73c2e3fd36e.png align="center")

3\. Select open and then open in the new tab option to browse the table records

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182350714/c4cfe11d-a48c-4f49-9952-5d81f44f9ebf.png align="center")

4\. Add new columns **"Is Enabled for Dual write" & "Default owning team"**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182403037/6ea83159-b2bf-452d-8856-29102c796b91.png align="center")

4\. Verify the missing legal entity records

5\. If the record exists then verify the value set as YES in column **"Is Enabled for Dual write"** or not

6\. Verify the data value for the Default owning team exists or not

*B. Environment details*

1\. Validate environment details for in Dynamics 365 FO and add newly created Legal entity

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682182473734/cd8ab6e0-fd10-4df1-bae4-1a7de026a879.png align="center")

2\. Navigate to Dataverse and validate the newly created legal entity/company records

# Conclusion

With troubleshooting steps, you can ensure your company records issue of Dual-write is easy to understand. If you're working on your next Dual-write project, make sure you follow these steps to make troubleshooting easier!

Hope you found this post helpful and that you'll find a perfect guide to troubleshooting company record issues in Dual-write infrastructure!

Happy troubleshooting!

# Thank you for Reading - Let's Connect!

Enjoy my blog? For more such awesome blog articles - follow, subscribe and let's connect on [LinkedIn](https://www.linkedin.com/in/rakeshdarge/), [Twitter](https://twitter.com/DargeRakesh?s=08), [YouTube](https://www.youtube.com/user/rakeshdarge/videos)

Stay tuned!
