Copy Customer from One Legal Entity to Another

Hello,

We have just brought on another legal entity and we want to be able to copy new customer accounts from LE to the new LE as they are created.

We use dual write, so we can not use cross company data sharing. We did turn off dual write and we did an initial push from one LE to the other using CCDS.
We are using the Data Management copy once per week, but because it takes over 7 hours to run we can not run it more often.

What we’d like to do is insert or update the customer account at the time it is created or updated in the primary LE.
I have been looking at an extension class on the CustTable, but it does not seem that we can update the dataareaid through code.

Someone suggested that I use changecompany with buf2Buf, and I tried this in the onInserted event, and while it seems like it should work, I am getting ‘record already exists’ errors. Seems the onInserted happens after insertion but before commit.

Does anyone have any input on how this might be able to accomplished?

Thank you.

You can use business event of customer creation & trigger LogicApp based on it. Or you can use a Power platform flow for same purpose. It will trigger flow or LA when customer is created & then you can copy the data to another company within the flow or LA as required. We are using that for integration purpose & it triggers after all data is inserted.