# Ability to Update PrimaryCompany and PrimaryDepartment Fields

**URL:** https://community.nextw.com/t/ability-to-update-primarycompany-and-primarydepartment-fields/1331
**Category:** Foundation
**Created:** [October 10, 2025, 6:59pm UTC](https://community.nextw.com/t/ability-to-update-primarycompany-and-primarydepartment-fields/1331 "2025-10-10T18:59:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![melanie.spence](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/melanie.spence/32/332_2.png) [@melanie.spence](https://community.nextw.com/u/melanie.spence)
#### Post date: [October 10, 2025, 6:59pm UTC](https://community.nextw.com/t/ability-to-update-primarycompany-and-primarydepartment-fields/1331/1 "2025-10-10T18:59:18Z")

</div>

Hello, in the directory is it possible to update the PrimaryCompany and PrimaryDepartment fields on a Directory record after it has been created? The use case is we have Customers we want to convert into Employees but we are unable to because we can’t add their PrimaryCompany and PrimaryDepartment fields. Is there any way to write to these fields after a customer has been created. I tried calling WriteDirectory with those values in the fields but the customer record is able to have both contact roles, but the PrimaryCompany and PrimaryDepartment fields are still empty.

---

<div class="post-metadata">

### Author: ![tyler.pham](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/tyler.pham/32/218_2.png) [@tyler.pham](https://community.nextw.com/u/tyler.pham)
#### Post date: [October 10, 2025, 8:49pm UTC](https://community.nextw.com/t/ability-to-update-primarycompany-and-primarydepartment-fields/1331/2 "2025-10-10T20:49:20Z")

</div>

Hi Melanie — let me start with a little context.

When directory underwent an overhaul to support company-specific directory records, a `Company` field was added. This field was meant to only be used by Customers and Suppliers, while Employees would continue using the `PrimaryCompany` field. For employees however, these fields needed to be consistent.

As of right now, it is _not_ possible to update `PrimaryCompany` (as well as `Company`) because they are _locked_ fields on the table. We opted to make these fields locked to protect references to it from existing transactions by company. `PrimaryDepartment` is _not_ locked, but is dependent on `PrimaryCompany`.

What I remember is that this specific use case (customer becoming an employee) was an edge case and deemed unlikely. It sounds like we would need to rethink about this and brainstorm a solution, but that is a discussion to be had with the product team.

EDIT: This has been a known gap in the original implementation. I think you will need to make a _separate_ employee record and associate it to the correct company/department.
