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